Generating API docs for clojure 1.3 projects

2011-06-20 Thread Tassilo Horn
Hi all, I'd like to generate some API docs for my clojure 1.3 lib. The way to go seems to be autodoc. However, with version 0.7.1 (the stable release), my leiningen fails to fetch the required dependencies. On clojars, there are several other forks/versions, but for all of them including a self

Re: porting an old project - where to begin?

2011-06-20 Thread Daniel
http://forum.processing.org/topic/fix-my-program#2508001008001 Managed to get most of the components to work. Having issues panning. Thought I'd keep you guys up to date. Once this is completed I can test a couple more things before porting this to clojure. On Jun 7, 11:11 pm, Daniel wro

Re: eval and load-string behavior

2011-06-20 Thread David Nolen
On Mon, Jun 20, 2011 at 7:45 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > I got a very nasty bug from this behavior today > > user=> (def a (fn [] "outside a")) > #'user/a > user=> (let [a (fn [] "inside a")] (load-string "(a)")) > "outside a" > user=> (let [a (fn [] "inside a")] (

Re: eval and load-string behavior

2011-06-20 Thread Sean Corfield
On Mon, Jun 20, 2011 at 4:45 PM, Jonathan Fischer Friberg wrote: > user=> (def a (fn [] "outside a")) > #'user/a > user=> (let [a (fn [] "inside a")] (load-string "(a)")) > "outside a" > user=> (let [a (fn [] "inside a")] (eval '(a))) > "outside a" > > Is this really how these functions should beh

Re: Job position for haskell/clojure dev. in San Dimas, CA

2011-06-20 Thread Vagif Verdi
Sorry, forgot to mention, and i already got questions about it. No worker visa sponsorship, no relocation from abroad. US only. On Jun 20, 2:36 pm, Vagif Verdi wrote: > Anyone interested in full time employment working with haskell and > clojure in San Dimas, CA (local job only, NO telecommute) p

eval and load-string behavior

2011-06-20 Thread Jonathan Fischer Friberg
I got a very nasty bug from this behavior today user=> (def a (fn [] "outside a")) #'user/a user=> (let [a (fn [] "inside a")] (load-string "(a)")) "outside a" user=> (let [a (fn [] "inside a")] (eval '(a))) "outside a" Is this really how these functions should behave? Jonathan -- You received

Re: Scope of Command Line Args

2011-06-20 Thread octopusgrabbus
Thanks. Your way of doing it is cleaner. On Jun 20, 6:37 pm, Sean Corfield wrote: > On Mon, Jun 20, 2011 at 12:26 PM, octopusgrabbus > > wrote: > > In the following program, is the scope of the command line arguments > > -- args --  local to with-command-line, or can they be accessed > > outside

Re: Scope of Command Line Args

2011-06-20 Thread Sean Corfield
On Mon, Jun 20, 2011 at 12:26 PM, octopusgrabbus wrote: > In the following program, is the scope of the command line arguments > -- args --  local to with-command-line, or can they be accessed > outside with-command-line? args itself is available in the scope of your -main function. The command l

Job position for haskell/clojure dev. in San Dimas, CA

2011-06-20 Thread Vagif Verdi
Anyone interested in full time employment working with haskell and clojure in San Dimas, CA (local job only, NO telecommute) please let me know. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.

Re: Trying to set up clojure... and failing

2011-06-20 Thread Peter Tabatt
Thanks guys :) On Jun 20, 1:29 am, Mark Rathwell wrote: > I think lein runs 'deps' with the 'repl' task, but just in case you may also > want to include a 'lein deps' in step 3: > > 3. Get a repl to play around with: > > cd first-time > lein deps > lein repl > > On Mon, Jun 20, 2011 at 2:17 AM, M

Scope of Command Line Args

2011-06-20 Thread octopusgrabbus
In the following program, is the scope of the command line arguments -- args -- local to with-command-line, or can they be accessed outside with-command-line? I think they are local to with-command-line. (ns test-csv (:gen-class) (:use clojure.contrib.command-line) (:use clojure-csv.core))

Re: Why should I use emacs instead of netbeans?

2011-06-20 Thread Stefan Kamphausen
Hi, On Monday, June 20, 2011 5:47:58 PM UTC+2, Gregg Reynolds wrote: > > On Sun, Jun 19, 2011 at 8:57 AM, James Keats wrote: > > Minor correction: if you get used to Emacs, you'll never want to use > anything else. that's precisely what I meant. IIRC I am using Emacs since 1995/96 or som

Re: clojure.contrib.sql and multiple connections

2011-06-20 Thread Shantanu Kumar
Write different functions for source and target? (declare source-conn) (declare target-conn) (defn get-source-data [] (sql/with-connection source-conn ...)) (defn put-target-data [data] (sql/with-connection target-conn ...)) (defn data-transfer [] (let [source (get-source-da

Re: Why should I use emacs instead of netbeans?

2011-06-20 Thread Gregg Reynolds
On Sun, Jun 19, 2011 at 8:57 AM, James Keats wrote: > > > On Jun 18, 4:08 pm, Stefan Kamphausen wrote: >> Hi, >> >> these modern IDEs really do a tremendous job at organizing projects and >> providing additional information at programming time. It's just, their >> text-editor components suck. >>

Re: Allow Data Structure to Be Called as Function

2011-06-20 Thread Ryan Twitchell
Most notably, reify does not "def" anything. It's very in-tune with functional programming in that way, as it has no side-effects, whereas defrecord adds a class to the namespace. reify has been compared to Java's anonymous classes. A good example of its use might be in implementing a factory me

Re: Clojure and swedish characters on windows...

2011-06-20 Thread Andreas Liljeqvist
Lein repl. It doesn't really matter to me since I use Emacs to develop. Just afraid that the encoding problems would follow ever JAR I distribute to end-users. Will test it when I get the time. 2011/6/20 Rasmus Svensson > 2011/6/20 Andreas Liljeqvist : > > I still have encoding problems in repl

Re: Clojure and swedish characters on windows...

2011-06-20 Thread Rasmus Svensson
2011/6/20 Andreas Liljeqvist : > I still have encoding problems in repl outside of Emacs (of course...). > This is fine while I am developing, but problematic for rolling out to > customers. > > Setting -Dfile.encoding=UTF8 > Doesn't solve it. > > Anyone? What repl? Bare java -cp clojure.jar cloju

Re: Clojure and swedish characters on windows...

2011-06-20 Thread Phil Hagelberg
This is probably a jline bug. Installing rlwrap should make it work. Leiningen will issue a warning now if rlwrap is not found and it has to fall back to jline. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

Re: Help organizing code and namespaces

2011-06-20 Thread Jonathan Fischer Friberg
Create a new namespace+file my.server where the *server* resides, then let my.query and my.update use my.server. Jonathan On Sat, Jun 18, 2011 at 3:52 PM, Matt Mitchell wrote: > Hi, > > I have 3 namespaces, each with functions that relate to the name of the ns: > > core -- contains config and *

Re: Detailed Macro Quoting Question

2011-06-20 Thread Jonathan Fischer Friberg
As Benjamin said, proxy does not support variable arg list with &, multiple arity is used in the following way: (method-name ([arg0] ...) ([arg0 arg1] ...)) Jonathan On Sun, Jun 19, 2011 at 10:58 AM, Benjamin Teuber wrote: > Some remarks: > > > (defmacro make-msg-ewrapper [method-names] > m

Re: Allow Data Structure to Be Called as Function

2011-06-20 Thread Jonathan Fischer Friberg
Sometimes I'm just too eager; I changed the macro so that the first argument to the function is the current record (i.e. "this"). user=> (definvokerecord (fn [this & args] (apply + args)) ATEST []) user.ATEST user=> (def a (ATEST.)) #'user/a user=> (a 1 2 3) 6 user=> (a 1 2 3 4 5) 15 Jonathan O

Re: Allow Data Structure to Be Called as Function

2011-06-20 Thread Jonathan Fischer Friberg
Maybe I should add how to actually use it: the first argument is a function which will be called when the record is called. the rest is simply the arguments to defrecord, as usual. Jonathan On Mon, Jun 20, 2011 at 3:23 PM, Jonathan Fischer Friberg < odysso...@gmail.com> wrote: > Here is said ma

clojure.contrib.sql and multiple connections

2011-06-20 Thread MattC
Hi, I am writing a lot of programs shuffling data between databases and would like to use Clojure for some of it. While investigating the sql contrib library I was wondering whether there is a supported way to have more than one database connection open at any one time. My initial approach was

Re: Allow Data Structure to Be Called as Function

2011-06-20 Thread Jonathan Fischer Friberg
Here is said macro: https://gist.github.c om/1035590 user=> (definvokerecord (fn [& args] (apply + args)) ATEST []) user.ATEST user=> (ATEST.) #:user.ATEST{} user=> (def a (ATEST.)) #'user/a user=> (a 1 2 3) 6 user=> (a 1 2 3 4 5) 1

Re: Are the docs on clojure.org always kept up to date?

2011-06-20 Thread Jonathan Fischer Friberg
There is a clojure design page: http://dev.clojure.org/display/design/Home http://dev.clojure.org/display/design/Library+Coding+Standards Jonathan On Sun, Jun 19, 2011 at 4:51 PM, James Keats wrote: > Hi all, > > Clojure seems to be a language in a bit of flux (eg, defstruct vs > defrecord), is

ANN: Hafni

2011-06-20 Thread Jonathan Fischer Friberg
Hi, I figured that I would announce a library that I have been working on for a while now. It's called Hafni, and it's a swing wrapper. Why another swing wrapper? I wanted to solve the following problems: 1. There are a lot of boilerplate code needed. 2. Changes made to content is not very func

Re: #= reader macro

2011-06-20 Thread Jonathan Fischer Friberg
You should use ~' for anaphora. If for example `~this is used, 'this' is going to be unquoted, and the content of "this" will be backquoted. With ~'this , the symbol "this" is first quoted, and then that symbol is unquoted, resulting in the symbol "this". Backquote should by the way definitely no

practical clojure

2011-06-20 Thread faenvie
today, once again, i realized, that of all 4 books, that i have read about clojure , 'practical clojure' is the one, that i like most. minimalistic, straight to the point, mostly clear in it's language. i would love to buy a second edition once clojure 1.3 or 2.0 is out. -- You received this me

Re: Clojure and swedish characters on windows...

2011-06-20 Thread Andreas Liljeqvist
I still have encoding problems in repl outside of Emacs (of course...). This is fine while I am developing, but problematic for rolling out to customers. Setting -Dfile.encoding=UTF8 Doesn't solve it. Anyone? 2011/6/20 Andreas Liljeqvist > Thank you Phil, that fixed it. > > > 2011/6/19 Phil