Re: keyword with slash to string

2011-12-05 Thread finbeu
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

keyword with slash to string

2011-12-05 Thread finbeu
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

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
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

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
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

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
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

Re: Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
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

Debugging lazy seqs with log4j

2011-11-11 Thread finbeu
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

Re: Stanford ai-class

2011-11-08 Thread finbeu
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

Re: problems of a newbie

2011-11-06 Thread finbeu
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

Stanford ai-class

2011-11-06 Thread finbeu
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

Re: Leiningen: How to remove source code from uberjar

2011-11-03 Thread finbeu
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

Leiningen: How to remove source code from uberjar

2011-11-03 Thread finbeu
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

R.I.P. John McCarthy

2011-10-24 Thread finbeu
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

Re: Problem with insert-values (clojure.contrib.sql)

2011-09-14 Thread finbeu
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

Re: Problem with insert-values (clojure.contrib.sql)

2011-09-13 Thread finbeu
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

Re: Problem with insert-values (clojure.contrib.sql)

2011-09-13 Thread finbeu
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

Problem with insert-values (clojure.contrib.sql)

2011-09-13 Thread finbeu
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

Re: Clojure in Emacs Seemingly Impossible

2011-09-11 Thread finbeu
> > 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

Land of Lisp music video

2011-09-02 Thread finbeu
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

Aw: Re: is there a 4Clojure forum anywhere?

2011-09-01 Thread finbeu
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

Aw: is there a 4Clojure forum anywhere?

2011-08-30 Thread finbeu
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

uberjar starts a repl

2011-08-26 Thread finbeu
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

Aw: Re: How to import and use an enum enclosed in an java interface?

2011-08-02 Thread finbeu
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

Aw: Re: How to import and use an enum enclosed in an java interface?

2011-08-02 Thread finbeu
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,

How to import and use an enum enclosed in an java interface?

2011-08-02 Thread finbeu
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

Aw: Re: Clojure Books

2011-07-19 Thread finbeu
- 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

Aw: clooj, a lightweight IDE for clojure

2011-07-18 Thread finbeu
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

Aw: Re: How to add jar files to leiningen projects?

2011-07-12 Thread finbeu
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

Aw: Re: How to add jar files to leiningen projects?

2011-07-12 Thread finbeu
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>

What's your workflow in IntelliJ IDEA

2011-07-11 Thread finbeu
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

Aw: Re: How to add jar files to leiningen projects?

2011-07-11 Thread finbeu
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

Aw: How to add jar files to leiningen projects?

2011-07-11 Thread finbeu
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

How to add jar files to leiningen projects?

2011-07-11 Thread finbeu
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

SQL queries on csv-files

2011-06-14 Thread finbeu
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

Re: How to create a library for java developers

2011-05-31 Thread finbeu
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

How to create a library for java developers

2011-05-31 Thread finbeu
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

Re: Compojure: How to process GET query string

2011-05-18 Thread finbeu
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.

Compojure: How to process GET query string

2011-05-18 Thread finbeu
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

Re: Loading clojure code during runtime

2011-03-11 Thread finbeu
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

Loading clojure code during runtime

2011-03-11 Thread finbeu
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.

Problem domains for clojure

2011-03-05 Thread finbeu
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

Re: processing a socket stream

2011-03-03 Thread finbeu
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

Re: processing a socket stream

2011-03-03 Thread finbeu
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

processing a socket stream

2011-03-03 Thread finbeu
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

Re: Problem establishing jdbc connection in la clojure REPL

2011-02-28 Thread finbeu
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.

Problem establishing jdbc connection in la clojure REPL

2011-02-27 Thread finbeu
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