I'm impressed. Thank you very much!
--
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
first post.
To unsubscribe
Hello,
weird, I know, but I have keywords in a map like this:
:first/second
I want to convert such a keyword to a string and I'm doing this with the
"name" function. This doesn't work with a slash:
(def x :first/second)
(name x)
"second"
(The reason why I have such keywords at all is that d
Thanks. I think when I tried it (correct me if I'm wrong) it was not
possible to set the debug level dynamic. For instance I usually have a port
where I can send messages to (simple UDP datagram packet), the message
string is a map which I read-string and eval and upon that event, I reset
some
yes, when starting my project, I was looking at the logging library which
resides (resided) in clojure.contrib and I didn't like it at that point in
time. I think because it was trying to do too many things at once. If my
use case can be solved with some small java wrappers, I try to do it on my
Yes! That's it. With pr-str it works. Thx!!
--
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
first post.
To uns
Hi Sean
no, not yet. I stick with my own simple logging ns which works nice so far.
Just have to fix this ...)
(but I use clojure.java.jdbc with Sybase ASE 15.0.3. I hope I will find
some time soon to contribute some testcases.)
Finn
--
You received this message because you are subscribed to
Hello,
I'm using log4j and have some a simple wrappers in clojure that work well
so far.
Actually, I do
(def *logger* (Logger/getRootLogger))
Then I set loglevel, appenders, layout and so on.
I have a function
(defn debug [msg]
(.debug *logger* msg)
This works nice as long as I do not tr
Hi Simon
I originally thought that I'd be trying to implement things in
> Clojure. In hindsight, while it's been interesting to look at the
> programming assignments, I wouldn't have had time for something in
> that depth. Have you tried?
>
No. But that was my initial plan as well to do it in
I second your comment regarding the PGP sig.
--
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
first post.
To un
Hi
who is taking the Stanford ai-class with Peter Norvig and Sebastian Thrun?
I remember there was a thread on this group in august. I'm doing now the
advanced track and it is a lot of fun although we have no programming
assignments (was dropped because of mass enrollment of 140K students). The
Great. Works! Thanks!
--
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
first post.
To unsubscribe from this grou
Hello
is there a way to tell Leinigen not to include the source code into the
uberjar? I just want to ship the class files (AOT compiled).
Thx.
Finn
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
John McCarthy, the father of Lisp, died last night at the age of 84.
--
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
Yes, if I understand it correctly, instead of db, I just use the pooled-db
It would be good to have an example that connects the pooled db stuff with
the normal db stuff.
(defn db-update-or-insert
"Updates or inserts a fruit"
[record]
(sql/with-connection pooled-db
(sql/update-or-inser
Sean, thx for the hint.
But how do I use the connectionpool now from clojure.java.jdbc?
(defn db-update-or-insert
"Updates or inserts a fruit"
[record]
(sql/with-connection db
(sql/update-or-insert-values
:fruit
["name=?" (:name record)]
record)))
In my scenario, I just
oh yes. Now it works.
Thanks for the quick response!
BTW: Does someone know how I can keep the connection always open? If I
understand it right, "with-connection" does a connect and login to the db
each time it gets called. Isn't this quite inefficient?
- Finn
--
You received this message
Houston, I have a problem:
(sql/with-connection db_spec
(sql/insert-values "MyTable" ["Number" "Name" "FloatValue"]
[5, "A", 2.0] [6 ,"B", 3.0])
This works perfectly fine.
Now I'm trying to do the following:
(def x [[5, "A", 2.0] [6 ,"B", 3.0]])
(sql/with-connection db_spec
>
> Also, if I can't get Emacs going, would anyone suggest an alternative
> development tool? (I know there are lots, but I don't know which to
> try first).
>
> I use IntelliJ IDEA with La Clojure and Leiningen plugin. I usually create
a skeleton project with leiningen on the command line, t
Just found this:
http://www.youtube.com/watch?v=HM1Zb3xmvMc
Awesome ...
--
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
joined the group and posted!
Thx for setting it up.
- Finn
--
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
Hmm, I got stuck on the "Compress a sequence". I had a look at the
clojure/core.clj distinct function and I guess I have to use something
similar to define my function. Or is it easier?
- finbeu
--
You received this message because you are subscribed to the Google
Groups "Clo
Hello,
I have an application written that gets deployed using a uberjar built with
leiningen. Works perfectly fine.
For training purposes, I want to give a training version of that application
that does not start the application (the -main routine) but a REPL so users
can interactively use fu
This works also! thx a lot.
--
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
first post.
To unsubscribe from thi
Works! Ken, thx.
--
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
first post.
To unsubscribe from this group,
Hello,
how do I have to use an enum in clojure that is enclosed in an java
interface? I decomplied it in IDEA and I got something like that:
package com.api.test;
public interface Foo {
.
.
static final enum BarType {
public static final ONE, public static final TWO
- Practical Clojure (APress) is an excellent reference book. I use it all
the time + the clojure cheat sheet.
- Programming Clojure is good to start with, but I really didn't like all
the Lancet stuff that was included as example.
- Joy of clojure: Great. But not easy (was my third book).
-F
Arthur hi,
that's cool! Just works out of the box! I will recommend it to everyone that
wants to try clojure.
- Finn
--
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
Yeah! I downgraded to 1.5.2 and now it works.
Thanks a lot. Really nice.
--
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
Hi Shantanu,
thanks a lot for that! Looks great. I just downloaded it, but now lein
doesn't work anymore. It fails on windows using lein.bat.
Even
lein new blabla
fails
If I remove the plugin, lein works again.
Brgds,
- Finn
C:\Documents and Settings\finn.beutel\My Documents\Clojure\lein>
Hi,
I'm using Jetbrains IntelliJ IDEA Community Edition with La Clojure and
Leiningen Plug In. I think it is really great, but I have the feeling my
workflow is not very efficient, it is a mix of invoking command lines (lein
new myproject), then switching to IDEA, running lein commands from the
Hi Phil,
leiningen is really great. I haven't used maven before so I was really
scratching my head. Would be great to have an option like this so I don't
have to run mvn on the command line.
Thanks!
- Finn
--
You received this message because you are subscribed to the Google
Groups "Clojure
That was fast. Makes sense. Thanks!
- Finn
--
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
first post.
To unsu
Hello,
I have some external jar libaries that I need to import in my clojure
namespace. As I just started to use leinigen, I don't understand how to add
them to my project. Let's say the library resides in c:\temp\jars\mylib.jar
How do I add this properly to mein leinigen project?
(defproject
Hello,
I have a couple of csv files that are actually dumped data from SQL
tables. These tables have proper relationships with key, foreign keys
so they can be easily joined using SQL.
I would like to load them into memory and then appy SQL queries on
that data. So in fact, I'm looking for a cloj
Hi Ambrose,
actually, I want to write this facade to learn how the java interop
works. I'm still a beginner but calling java from clojure already
works pretty good and I'm able to get things done faster with less
code. The next step is then to make this clojure facade available for
the java develo
I'm using some legacy inhouse java libraries that are pretty
complicated (lots of boilerplate and ugly code bloat to produce
something useful). I would like to build a facade in clojure and
provide a jar file so that this clojure facade can be easily used by
java developers that do not know anythin
Got it! Works. Thx for the quick reply
- FB
On 18 Mai, 15:46, gaz jones wrote:
> query string params appear in the params of the request:
>
> (GET "/math" {params :params} []
> (get params :a) ;; 1
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
Hi
I don't know how to extract the query string from a route. I guess it
is pretty simply but I don't get it.
http://localhost:8080/math/add?a=1&b=2&c=3
I quess they can be retrieved somehow with :query-string keyword? But
I have no clue how.
(GET "/math/:command" [command & more]
Tha
beautiful! Thx.
On 11 Mrz., 10:23, Benny Tsai wrote:
> (read-string) converts a string into a Clojure object, which can then be
> (eval)ed:
--
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
e with the defintion of the function, apply the function
with map to the list the clients request from my webservice and return
the new list.
I think this task is pretty simple to accomplish with clojure. But how
would I do that? I think I need to eval the code somehow dynamically
and use it.
Thanks.
Hi,
are there (problem) domains for which clojure is especially well
suited for? As an example, is it a good idea to build a mathematical
library with it? I'm planning to do computational extensive stuff with
clojure. Looks like that clojure is a good fit as I can leverage on
existing java librari
James thx. That is what I need for my project: Some coaching when to
fall back to java, when to use clojure function and so on. That's
cool.
Rgds
- Finn
On 3 Mrz., 15:59, James Reeves wrote:
> On 3 March 2011 14:39, finbeu wrote:
>
> > But I have right now no clue to do th
ere a clojure function to do
this or do I have to fall back to java?
Thanks.
On 3 Mrz., 11:25, finbeu wrote:
> 1/ I want to write a server in clojure that accepts the connection
> from this client application, parses the xml-input stream and builds a
> cache with the key/values received fr
erplate or examples would help me a lot to get
started! :-)
Thanks!
- Finn (finbeu)
--
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
Interesting, I can run the code by building it via "Run ..". It works
fine within IDEA. But not via Idea's REPL.
So no firewall issue (I have no zonealarm or any other local firewall
running).
Looks like the REPL in IDEA has really a problem establishing a socket
connection.
clojure
package that ships with Stuart's "Programming Clojure" and that was
success!
So I think there is a problem with my "la clojure" REPL. Looks like
it does not allow me to establish a tcp/ip connection?
Any ideas?
- finbeu
=
(use 'clojure.cont
46 matches
Mail list logo