Re: fixing web docs

2011-03-29 Thread Devin Walters
Dare I mention the idea of an official (or semi-official) Clojure documentation project that ties together the disparate sources that currently exist? What say you, community? There is a lot of information out there that simply needs to be placed in the right bucket in order for it to be useful

Re: fixing web docs

2011-03-29 Thread Nick Zbinden
One more thing people should do is update there blogs. I know its stupid work but I should be done. Its extremly confusing when google for something. Update your blog with a little notice or update it that it is correct again. -- You received this message because you are subscribed to the Google

Re: fixing web docs

2011-03-29 Thread Rayne
It is a hosting problem. Heinz (Licenser) currently hosts the domain and the site as well. It is not really under my control. I had no idea that the site was down. I think emailing me or telling me on IRC or twitter or one of the other easily found and plentiful ways to get a hold of me is much bet

Re: fixing web docs

2011-03-29 Thread Ken Wesson
On Tue, Mar 29, 2011 at 8:21 PM, Devin Walters wrote: > TryClojure is an opportunity, not a liability. Treat it as such. Oh, I agree that it is an opportunity, but in its present yo-yo state it will reflect poorly on the main site and have unintended consequences. I wholeheartedly support the ide

Re: fixing web docs

2011-03-29 Thread Alan
My understanding is that it's mostly a hosting problem. I'll ask Raynes about it - the code is mostly his, as I understand it. On Mar 29, 5:08 pm, Sean Corfield wrote: > On Tue, Mar 29, 2011 at 5:00 PM, Ken Wesson wrote: > >> Pointing out try-clojure.org would probably be a good thing there > >>

Re: fixing web docs

2011-03-29 Thread Devin Walters
-1 TryClojure is an opportunity, not a liability. Treat it as such. 2c Sent via mobile On Mar 29, 2011, at 8:00 PM, Ken Wesson wrote: > On Tue, Mar 29, 2011 at 2:03 PM, Sean Corfield wrote: >> Having one central authoritative Getting Started page might be a good >> thing. > > +1 > >> Howev

Re: fixing web docs

2011-03-29 Thread Sean Corfield
On Tue, Mar 29, 2011 at 5:00 PM, Ken Wesson wrote: >> Pointing out try-clojure.org would probably be a good thing there >> (although that site is currently down) > > Terrible idea, unless that site is going to become a *lot* more > reliable in the very near future and then stay that way. I agree

Re: fixing web docs

2011-03-29 Thread Ken Wesson
On Tue, Mar 29, 2011 at 2:03 PM, Sean Corfield wrote: > Having one central authoritative Getting Started page might be a good > thing. +1 > However, the official page isn't very welcoming for newbies right now > since it assumes you either start with an IDE or a build tool. > Pointing out try-cl

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread Ken Wesson
On Tue, Mar 29, 2011 at 4:43 PM, B Smith-Mannschott wrote: > On Tue, Mar 29, 2011 at 18:44, Saul Hazledine wrote: >> On Mar 29, 3:13 pm, B Smith-Mannschott wrote: >>> >>> (defn constructor >>>  [{:keys [class-name fields] :as cfg}] >>>  ["    " class-name "(" (formal-params cfg) ") {\n" >>>   (s

Re: Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)

2011-03-29 Thread Phil Hagelberg
On Mar 28, 10:24 pm, Andy Fingerhut wrote: > And I should have known about this before, but had not used it.  It adds to > Leiningen the capability to search, and I'm not sure, but perhaps also add > dependencies that were found: > > https://github.com/Licenser/lein-search This will be rolled i

Re: fixing web docs

2011-03-29 Thread Devin Walters
An effort to enumerate misleading stackoverflow answers is another noteworthy endeavor that requires a bit of attention. Food for thought. Sent via mobile On Mar 29, 2011, at 8:44 AM, Stuart Halloway wrote: > Hi all, > > One way to help people getting started with Clojure is to make sure the

Re: Macro compile vs run time, appengine-magic defentity

2011-03-29 Thread Meikel Brandmeyer
Hi, Am 29.03.2011 um 21:42 schrieb Thorsten Wilms: > [(with-meta key {:key true})] do not set ID/name. Which Clojure version are you using? If it is 1.2, try (with-meta key {:tag :key}). Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread B Smith-Mannschott
On Tue, Mar 29, 2011 at 16:30, Jonathan Smith wrote: > You might want to read through the source of scriptjure: > https://github.com/arohner/scriptjure > > For one way to do this sort of thing. Pretty much, you would make a > basic recursive descent parser that operates on a tree of clojure > prim

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread B Smith-Mannschott
On Tue, Mar 29, 2011 at 16:56, Meikel Brandmeyer wrote: > Hi, > > On 29 Mrz., 15:13, B Smith-Mannschott wrote: > >> How does one really separate "content" from >> "presentation" in such a case? > > Maybe not feasible, but a thought, that just came to my mind: do it > like enlive. Parse the templa

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread B Smith-Mannschott
On Tue, Mar 29, 2011 at 18:44, Saul Hazledine wrote: > I had a think about using Clojure rather than go to a separate > template system. Here's a horrible hack that uses eval to support > string templates: > > (ns clj-template.core >  (:require [clojure.contrib.string :as string])) > > (defn remov

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread B Smith-Mannschott
On Tue, Mar 29, 2011 at 16:04, Saul Hazledine wrote: > On Mar 29, 3:13 pm, B Smith-Mannschott wrote: ... > I haven't done this within Clojure but below is small example of a C++ > Cheetah template: > > https://gist.github.com/892415 > > Although it looks a bit of a mess the general structure of t

Re: fixing web docs

2011-03-29 Thread LordGeoffrey
I use confluence elsewhere and it is fine. On 30/03/11 04:14, Sean Corfield wrote: On Tue, Mar 29, 2011 at 5:44 AM, Stuart Halloway wrote: [2] NEW http://dev.clojure.org/display/doc/Getting+Started Sometimes this wiki seems grindingly slow (for me, at least). Is that a known issue with Confl

Re: Macro compile vs run time, appengine-magic defentity

2011-03-29 Thread Thorsten Wilms
On 03/29/2011 10:52 AM, Meikel Brandmeyer wrote: Ah. Now things become clear. I haven't read the problem correctly. You want [(with-meta key {:key true})]. Thanks, but unfortunately, that builds, but does not set the named key (running number for the ID/name attribute, again). ['^:key key]

Re: (memoize) and recursive functions (Clojure 1.2)

2011-03-29 Thread Benny Tsai
Fantastic! Thank you Sean. On Tuesday, March 29, 2011 11:37:06 AM UTC-6, Sean Corfield wrote: > > On Tue, Mar 29, 2011 at 8:31 AM, Benny Tsai wrote: > > Just out of curiosity, does "memoize" in 1.3 behave like the current 1.2 > > version or the 1.1 version? > > user=> (clojure-version) > "1.3.0-

Re: Clojure Editor

2011-03-29 Thread Shree Mulay
On Mar 18, 11:04 pm, Olivier Lefevre wrote: > On 3/13/2011 1:09 PM, WoodHacker wrote: > > > If you are looking for a very good editor for Clojure try Bluefish. > > It's been around for ever, is very stable, and does everything you > > would want an editor to do.   And it now works with Clojure. >

Re: fixing web docs

2011-03-29 Thread Sean Corfield
On Tue, Mar 29, 2011 at 5:44 AM, Stuart Halloway wrote: > [2] NEW http://dev.clojure.org/display/doc/Getting+Started Sometimes this wiki seems grindingly slow (for me, at least). Is that a known issue with Confluence or that server? > [5] OLD http://en.wikibooks.org/wiki/Clojure_Programming/Gett

Re: fixing web docs

2011-03-29 Thread Sean Corfield
On Tue, Mar 29, 2011 at 5:44 AM, Stuart Halloway wrote: > I would appreciate it if somebody would volunteer to update the content on > wikibooks [5]. It is extremely misleading because it mixes recent edits, > somewhat dated material, and very dated material. Would it be better if > wikibooks just

Re: (memoize) and recursive functions (Clojure 1.2)

2011-03-29 Thread Sean Corfield
On Tue, Mar 29, 2011 at 8:31 AM, Benny Tsai wrote: > Just out of curiosity, does "memoize" in 1.3 behave like the current 1.2 > version or the 1.1 version? user=> (clojure-version) "1.3.0-alpha4" user=> (defn f [n] (println "f called with" n) (if (zero? n) 0 (min (f (dec n))

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread Saul Hazledine
I had a think about using Clojure rather than go to a separate template system. Here's a horrible hack that uses eval to support string templates: (ns clj-template.core (:require [clojure.contrib.string :as string])) (defn remove-templating [s] (string/replace-re #"#" "\"" s)) (defn build-co

Re: (memoize) and recursive functions (Clojure 1.2)

2011-03-29 Thread Benny Tsai
Andreas, Mark, thank you for your suggestions. Both worked splendidly. Just out of curiosity, does "memoize" in 1.3 behave like the current 1.2 version or the 1.1 version? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread Meikel Brandmeyer
Hi, On 29 Mrz., 15:13, B Smith-Mannschott wrote: > How does one really separate "content" from > "presentation" in such a case? Maybe not feasible, but a thought, that just came to my mind: do it like enlive. Parse the templates into an abstract tree and then use selectors to modify the tree. D

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread Jonathan Smith
You might want to read through the source of scriptjure: https://github.com/arohner/scriptjure For one way to do this sort of thing. Pretty much, you would make a basic recursive descent parser that operates on a tree of clojure primitives. You could then wrap this in a macro, and go from there.

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread Saul Hazledine
On Mar 29, 3:13 pm, B Smith-Mannschott wrote: > I can see the advantages of going this route for simple templates that > contain no optional elements and no repetition, but that's not going > to get me far. I still don't understand how these kinds of issues: > > (defn constructor >  [{:keys [class

Re: fixing web docs

2011-03-29 Thread Federico Brubacher
I think wikibooks has value on its own (it helped me when i was starting). I can help do some work to clean the old stuff, update it, improve it, etc. Best Federico On Tue, Mar 29, 2011 at 9:44 AM, Stuart Halloway wrote: > Hi all, > One way to help people getting started with Clojure is to make

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread B Smith-Mannschott
On Tue, Mar 29, 2011 at 10:06, Saul Hazledine wrote: > Hello Ben, > > On Mar 28, 10:36 pm, B Smith-Mannschott wrote: >> Hi all! >> >> I'm using Clojure to generate java source (enums, specifically) and am >> looking for ideas. >> > > I've done this quite a lot in the past using Python to generate

fixing web docs

2011-03-29 Thread Stuart Halloway
Hi all, One way to help people getting started with Clojure is to make sure the internet is accurate. :-) The outdated assembla pages (e.g. Getting Started at [1]) still have a lot of Google juice, so this morning I updated them all to link to the current documentation [2] at dev.clojure.org.

Swing GUI problem

2011-03-29 Thread Neven Radic
Hi all i am new with Clojure and i just experiment with swing. I have Java class witch generate GUI form public class QuennChesGUI extends javax.swing.JFrame{ public javax.swing.JTextField jTextField1; public javax.swing.JToggleButton jToggleButton1; public QuennChesGUI() {

Re: Leiningen capabilities (was Re: A newbie's summary - what worked, what didn't)

2011-03-29 Thread Jon Seltzer
Fair enough. It would be great if Clojure tools were as mature as Java's Eclipse or IntelliJ, but hey, Java's been around for 15 years. Probably unrealistic to expect more. Perhaps we can look forward to tools created by you. On Mar 28, 10:32 pm, ultranewb wrote: > < lisp code for 40 years a

Re: A newbie's summary - what worked, what didn't

2011-03-29 Thread Jon Seltzer
This is exactly what I use and it works perfectly. On Mar 28, 10:48 am, David Nolen wrote: > On Mon, Mar 28, 2011 at 12:39 PM, Lee Spector wrote: > > > > > On Mar 28, 2011, at 12:19 PM, Luc Prefontaine wrote: > > > "But with any other language I've ever used, at most I include a > > > library I n

Re: A newbie's summary - what worked, what didn't

2011-03-29 Thread Jon Seltzer
I use JEdit exclusively as described by David and adding external libraries to the classpath on my own when I launch the REPL. Really, setting the classpath isn't that hard and if you're really planning on using Clojure long term then you'll have to deal with it eventually. So why not just spend

Java Native (jna on win32 - WinXP) strange/ inconsistent behavior

2011-03-29 Thread biosckon
While exploring http://nakkaya.com/2009/11/16/java-native-access-from-clojure/ --- (import 'com.sun.jna.Function) (defmacro jna-call [lib func ret & args] `(let [library# (name ~lib) function# (com.sun.jna.Function/getFunc

Re: (memoize) and recursive functions (Clojure 1.2)

2011-03-29 Thread Mark Nutter
I just saw this in another thread. Try this version instead: (defn f [n] (println "f called with" n) (if (zero? n) 0 (min (#'f (dec n)) (#'f (dec n) What's happening is that inside the body of f, the "f" is a symbol whose contents point to the anonymous function being def

Re: Macro compile vs run time, appengine-magic defentity

2011-03-29 Thread Meikel Brandmeyer
Hi, On 29 Mrz., 09:56, Thorsten Wilms wrote: > [^:key key] leads to a datastore field "slug", as that's the argument > for key, but it won't be used as named-key for the record. Ah. Now things become clear. I haven't read the problem correctly. You want [(with-meta key {:key true})]. Sincerely

Re: using clojure for (java) code generation; advice sought

2011-03-29 Thread Saul Hazledine
Hello Ben, On Mar 28, 10:36 pm, B Smith-Mannschott wrote: > Hi all! > > I'm using Clojure to generate java source (enums, specifically) and am > looking for ideas. > I've done this quite a lot in the past using Python to generate C++. After trying different methods, I used a templating system (C

Re: Macro compile vs run time, appengine-magic defentity

2011-03-29 Thread Thorsten Wilms
On 03/28/2011 10:29 PM, Alan wrote: If you need it quoted in the "def" context: (defmacro def-entity-and-attrs [entity-name key attrs-name attrs] `(do (def ~attrs-name '~attrs) (ds/defentity ~entity-name ~(vec (concat ['^:key key] attrs) Note the ' before attrs. Thank you, wo