The correct syntax works. So basically if the swank-clojure-classpath
has the required jar I should be able to import it in this way. The
classpath seems to be tripping me up again.
Thanks,
Mohan
On Mar 31, 5:12 pm, Meikel Brandmeyer wrote:
> Hi,
>
> On 31 Mrz., 13:20, MohanR wrote:
>
> > (imp
You should really consider adding a ;tldr section in your posts ...
2011/4/1 Ken Wesson
> (I'm aware that there's a separate Enclojure Google Group but it seems
> to get very little traffic, and I've seen similar issues to mine
> raised there for literally years without seeing an answer posted
>
2011/4/1 Ken Wesson
> On Thu, Mar 31, 2011 at 3:24 PM, Laurent PETIT
> wrote:
> > 2011/3/31 Ken Wesson
> >>
> >> On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT <
> laurent.pe...@gmail.com>
> >> wrote:
> >> > Except in 1.3 it will be a little bit harder to do "throw-away"
> >> > per-thread
> >>
Brief update:
I have pushed 0.2 versions of both Clj-Liquibase (with pre-conditions
support) and Fountain-JDBC (with predicate-based and rule-based
transaction support) to Clojars. This brings Fountain-JDBC at par with
c.c.sql and brings in some of Spring goodness.
http://code.google.com/p/bitume
(I'm aware that there's a separate Enclojure Google Group but it seems
to get very little traffic, and I've seen similar issues to mine
raised there for literally years without seeing an answer posted
there, so I'm asking here.)
While Enclojure provides a decent REPL and generally decent editing U
status-codes allows you to report HTTP Response Status Codes as keywords like
:ok, :accepted and so on.
You can find code at github http://github.com/neotyk/status-codes
(use 'status-codes)
(GET "/test" _ :accepted)
;; or
(PUT "/test" _ {:headers {"Location" ..} :status :created})
Enjoy,
Hubert
Hello,
Is this code valid?
Clojure 1.3.0-master-SNAPSHOT
user=>
(let []
(defn foo [] :foo))
#'user/foo
user=> (foo)
ClassNotFoundException user$eval1450$foo__1451
java.lang.Class.forName0 (Class.java:-2)
It was valid before this commit.
https://github.com/clojure/clojure/commit/71930b6b6537a7
On Thu, Mar 31, 2011 at 3:24 PM, Laurent PETIT wrote:
> 2011/3/31 Ken Wesson
>>
>> On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT
>> wrote:
>> > Except in 1.3 it will be a little bit harder to do "throw-away"
>> > per-thread
>> > memoizes for vars you do no "own" if their author didn't make the
2011/3/31 Armando Blancas
> > So, really, all the current ccw behaviour wrt auto-compile, in background
> or
> > not, concept of "Clojure Application" will be reworked.
>
> One thing that ccw handles with ease is compiling Java for use right
> there in Clojure. With auto-compile one could do the
> So, really, all the current ccw behaviour wrt auto-compile, in background or
> not, concept of "Clojure Application" will be reworked.
One thing that ccw handles with ease is compiling Java for use right
there in Clojure. With auto-compile one could do the opposite just as
easy for dependent pro
> This is just *strange*. I'm working on converting a servlet that has
> hardwired vectors of values to read those values from a
> database. Given that this is simple, I'm using clojure.contrib.sql and
> an sqlite plugin. Those vectors get walked in the init code to create
> the hashmap that drives
This is just *strange*. I'm working on converting a servlet that has
hardwired vectors of values to read those values from a
database. Given that this is simple, I'm using clojure.contrib.sql and
an sqlite plugin. Those vectors get walked in the init code to create
the hashmap that drives page rend
2011/3/31 Armando Blancas
> > Your problem is probably that you only export the clj file. But the clj
> file
> > corresponds to a namespace with a gen-class. A gen-class must be
> compiled.
> > And yours is probably not.
>
> I'd think that's what the ccw.builder is there for.
More or less. What
2011/3/31 Ken Wesson
> On Wed, Mar 30, 2011 at 12:02 PM, Laurent PETIT
> wrote:
> > Except in 1.3 it will be a little bit harder to do "throw-away"
> per-thread
> > memoizes for vars you do no "own" if their author didn't make their
> holding
> > var :dynamic ('cause then you will not be able to
You don't actually need to quote class names: (import com.test.Test)
works. Of course if you're using the list syntax you do, to avoid
calling the package as a function; but you can get around that as well
by using a vector if you'd rather not quote: (import [com.test Test
OtherTest])
On Mar 31, 5
> Your problem is probably that you only export the clj file. But the clj file
> corresponds to a namespace with a gen-class. A gen-class must be compiled.
> And yours is probably not.
I'd think that's what the ccw.builder is there for. Then it'd be up to
the user to decide what to export. Having
Hi guys,
How do you create Javadoc for the interfaces created from clojure
Protocols or classes created using gen-class?
--
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 fro
Thanks Laurent and Isaac for pointers.
It would be interesting to know why clojure.core/add-classpath has
been deprecated in 1.1?
--
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 p
On Thu, Mar 31, 2011 at 5:49 PM, Vitaly Peressada wrote:
> Wanted to add jar to classpath without restarting REPL. Recalled java
> reflection hack. Ported to Clojure.
>
Have a look at http://icylisper.in/jark/classpath.html
Jark is a tool to manage classpaths and clojure namespaces on a persistent
I haven't had time to digest this whole thread and this solution is a bit
off the wall... but do you really have a requirement to generate Java source
? Would Java bytecode not suffice ?
If you were generating classes/interfaces you could ignore all the issues
with Java syntax and just write a
There is this which is in Clojure, but is considered deprecated :
clojure.core/add-classpath
2011/3/31 Vitaly Peressada
> Wanted to add jar to classpath without restarting REPL. Recalled java
> reflection hack. Ported to Clojure.
>
> user=> (import (org.apache.commons.cli Parser))
> ; fails with
Hi,
Your problem is probably that you only export the clj file. But the clj file
corresponds to a namespace with a gen-class. A gen-class must be compiled.
And yours is probably not.
The more I use clojure with java interop, the less I'm tempted to play with
gen-class when I'm not forced to.
Why
One alternative to this would be to start a Nailgun server. You can
add to the classpath quite easily.
That said, this looks pretty interesting.
Ambrose
On Thu, Mar 31, 2011 at 8:19 PM, Vitaly Peressada wrote:
> Wanted to add jar to classpath without restarting REPL. Recalled java
> reflection
Wanted to add jar to classpath without restarting REPL. Recalled java
reflection hack. Ported to Clojure.
user=> (import (org.apache.commons.cli Parser))
; fails with "#
(import (java.io File)
(java.net URL URLClassLoader)
(java.lang.reflect Method))
(defn add-to-cp [#^String jarpath]
(let
Hi,
On 31 Mrz., 13:20, MohanR wrote:
> (import '(com.test.Test))
The correct syntax is (import 'com.test.Test) or (import '(com.test
Test)). Note the subtle difference.
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to t
This has worked for me. Modify depending on your case.
CAVEAT: I built a fatjar using $ lein uberjar which I then added as an
external dependency in Eclipse. This included the clojure jar, the
contrib and potentially lots of other stuff I had in my project. It is
not entirely clear to me if one ne
I've posted this question on StackOverflow:
http://stackoverflow.com/questions/5452665/how-to-call-clojure-code-from-java
It's still not working. I thought a crowd focused on Clojure may be
able to help me out. Here's what I've done so far.
I have used the example code from this answer:
http://st
I am using Clojurebox.
If I import a Java class like this (import '(com.test.Test)) then C-c
C-l ( JIT compilation ) does not work because this statement
(let [t (Test/test "Test")])
throws java.lang.Exception: No such namespace: Test (core.clj:23)
I should be able to use this non-AOT compilat
On Thu, 31 Mar 2011 06:55:08 -0400
Allen Johnson wrote:
> > Is there some way to convince Jetty (or tomcat, or ...) to run the
> > init methods of a servlet before the first request comes in? Or maybe
> > a pointer to the appropriate forum?
>
> You can tell a servlet to init on startup with some
> Is there some way to convince Jetty (or tomcat, or ...) to run the
> init methods of a servlet before the first request comes in? Or maybe
> a pointer to the appropriate forum?
You can tell a servlet to init on startup with something like this in
your web.xml:
test-servlet
myapp.servlet
I finally got back to the web app that needed init'ing before
processing requests, and got that working (not quite as
straightforward as the various mails/docs make it look).
The problem now is that the init runs when the first request comes in
after the app has been started. While this works, it
Hi,
On 31 Mrz., 10:35, Vincent wrote:
> (map keyword (map :tag vector-of-map))
(map (comp keyword :tag) vector-of-map)
or
(map #(-> % :tag keyword) vector-of-map)
or
(for [{:keys [tag]} vector-of-map] (keyword tag))
Sincerely
Meikel
--
You received this message because you are subscrib
Hi!
I'm using Clojure 1.2.0, Moustache 1.0.0-SNAPSHOT and Appengine-magic
0.4.0.
My Article entity has a "body" property for text. The default String
property doesn't handle long text, so it needs to be a Text property.
In https://github.com/thurn/ackbar, I found:
---
(ns
(:import (com.
Dear all ,
can this be made better
(map keyword (map :tag vector-of-map))
thanks in advance
vincent
--
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
On Mar 30, 11:29 pm, Jozef Wagner wrote:
> On Wednesday, March 30, 2011 7:29:42 PM UTC+2, Mike Meyer wrote:
>
> > On Wed, 30 Mar 2011 10:21:41 -0700 (PDT)
> > Jeff Rose wrote:
>
> > > Hola,
> > > I'm looking for a function that updates a map value by calling a
> > > function on it.
>
> > > (def
35 matches
Mail list logo