Re: A website written using Clojure.

2009-06-26 Thread Emeka
Stuart Sierra, I want to use StringTemplate, could you give me a lead? Emeka On Thu, Jun 25, 2009 at 9:31 PM, Stuart Sierra wrote: > > On Jun 25, 3:59 pm, Berlin Brown wrote: > > But does anyone have a problem with Lisp/S-Expressions to HTML/XHtml, > > especially for the entire document. Wha

[OT] github (?) question

2009-06-26 Thread Laurent PETIT
Hi, this is an OT question, but since Rich encouraged git gurus here on the ml to on help non gurus, then I ask :-) By just surfing on github website, I find a cloned repository of clojure-contrib, e.g. clone done by user XXX. >From the main page of this repo, I can see who else cloned XXX's repo

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Baishampayan Ghose
Hello, Wow! Thanks a lot for the awesome advice. Thank you Konrad, Daniel, Berlin, Jonah, Raoul and others for the fantastic tips. I have, in-fact been able to convince our advisor about using Clojure. This won't have been possible without your help. Clojure, the language and the community rock

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Laurent PETIT
Hi, Out of curiosity, which (combination of) advice do you think 'closed the deal' ? Regards, -- Laurent 2009/6/26 Baishampayan Ghose > Hello, > > Wow! Thanks a lot for the awesome advice. > > Thank you Konrad, Daniel, Berlin, Jonah, Raoul and others for the > fantastic tips. > > I have, in-f

Re: [OT] github (?) question

2009-06-26 Thread Alex Combas
Yes Rich Hickey's git repository for clojure and clojure-contrib are the main development repositorys. http://github.com/richhickey/clojure/tree/master http://github.com/richhickey/clojure-contrib/tree/master The reason why git has no big flashing sign pointing to his repositorys is because git i

Re: [OT] github (?) question

2009-06-26 Thread Mike Hinchey
On the Source tab, the "fork of" link tells you - that is, Rich's don't have that line, so it is the root. On the Network Members tab, it shows a tree of the forks, with Rich at the root. You can browse all of the data in a repository through the website, so you shouldn't have to clone. And you

Re: [OT] github (?) question

2009-06-26 Thread Laurent PETIT
Hello, OK, I thought that the graph of cloned repositories was oriented, but it seems I was wrong :) Still, I don't see the "fork of" link, so maybe the person that created its clone did not do it via the fork functionality of github, but rather did it from its [desk/lap]top, and pushed his repo

Re: defn memory question

2009-06-26 Thread Rich Claxton
Thanks for all the interesting answers. On Jun 25, 5:23 pm, Stuart Sierra wrote: > On Jun 25, 6:25 am, RichClaxton wrote: > > > Hello I have just started learning Clojure and functional programming, > > quick question, what happens internally when I do a defn, does this > > create the byte code

Re: [OT] github (?) question

2009-06-26 Thread Christophe Grand
Hi Laurent, kevinoneill repos were mirrors of google-code's SVN. On Fri, Jun 26, 2009 at 10:47 AM, Laurent PETIT wrote: > Hello, > > OK, I thought that the graph of cloned repositories was oriented, but it > seems I was wrong :) > > Still, I don't see the "fork of" link, so maybe the person that

Re: [OT] github (?) question

2009-06-26 Thread Laurent PETIT
Ahh, yes, back in pre git time, thanks Christophe for the explanation. Regards, -- Laurent 2009/6/26 Christophe Grand > Hi Laurent, > > kevinoneill repos were mirrors of google-code's SVN. > > On Fri, Jun 26, 2009 at 10:47 AM, Laurent PETIT > wrote: > >> Hello, >> >> OK, I thought that the g

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Baishampayan Ghose
Laurent, > Out of curiosity, which (combination of) advice do you think 'closed the > deal' ? Well, the guy is a real startup veteran. I explained to him with some help from a bunch of Paul Graham essays that we want to use Clojure just because it is "practically" more suitable for the problem at

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Alex Combas
Thats great to hear, hope everything goes well, let us know how it turns out! Best regards, agc On Fri, Jun 26, 2009 at 1:55 AM, Baishampayan Ghose wrote: > Laurent, > > > Out of curiosity, which (combination of) advice do you think 'closed the > > deal' ? > > Well, the guy is a real startup v

Re: Question regarding example in Stuart Halloway's book (page 120)

2009-06-26 Thread Rowdy Rednose
I find the pdf actually pretty useful as a quick reference until I'm familiar with all the function names. There's however a small mistake on page 28. The 'd' doesn't belong there in the 2nd line of this example: (let [{a :a, b :b, c :c, :as m :or {a 2 b 3}} {:a 5 :c 6}] [a b c d m]) -> [5 3 6

Re: Improved Error Messages - Part XXXVIII

2009-06-26 Thread Rich Hickey
On Fri, Jun 26, 2009 at 12:31 AM, Four of Seventeen wrote: > > Got another one. > > (if-not (zero? diskqueue-count (if value >                                 (trait-dir trait) >                                 (trait-undecided-dir trait))) > > # of args passed to: core$fn (foo.clj:1625)> > > This

Re: [OT] github (?) question

2009-06-26 Thread CHEN Cheng
On Fri, Jun 26, 2009 at 10:47:02AM +0200, Laurent PETIT wrote: > Hello, > > OK, I thought that the graph of cloned repositories was oriented, but it > seems I was wrong :) > > Still, I don't see the "fork of" link, so maybe the person that created its > clone did not do it via the fork functiona

Re: [OT] github (?) question

2009-06-26 Thread Bruce Williams
Near the name of the repository it should say what repo it was forked from, if any. You can just follow the chain up. The "Network" diagram is also useful when trying to discover the canonical repo -- or the most up-to-date one. Cheers, Bruce On Jun 26, 2009, at 12:48 AM, Laurent PETIT w

how does Clojure macros work?

2009-06-26 Thread Michele Simionato
I am writing a rather long series of articles about Scheme on Artima, "The Adventures of a Pythonista in Schemeland" (maybe somebody here has heard of it). Last week I arrived at point of discussing hygienic macros (http://www.artima.com/weblogs/viewpost.jsp?thread=260195) and I wanted to spent a

Re: [OT] github (?) question

2009-06-26 Thread Laurent PETIT
Thanks all, Christophe gave the explanation. -- Laurent 2009/6/26 Bruce Williams > > Near the name of the repository it should say what repo it was forked > from, if any. You can just follow the chain up. > > The "Network" diagram is also useful when trying to discover the > canonical repo --

Re: how does Clojure macros work?

2009-06-26 Thread Michele Simionato
On Jun 26, 9:53 am, Michele Simionato wrote: > I want to asset the status of Clojure > macros with respect to hygiene. Some further experiment: $ clj Clojure 1.1.0-alpha-SNAPSHOT user=> (def x 42) #'user/x user=> (defmacro m[] 'x) #'user/m user=> (m) 42 user=> (let [x 43] (m)) 43 There is no

Re: how does Clojure macros work?

2009-06-26 Thread Rich Hickey
On Fri, Jun 26, 2009 at 3:53 AM, Michele Simionato wrote: > > I am writing a rather long series of articles about Scheme on Artima, > "The Adventures of a Pythonista in Schemeland" (maybe somebody here > has > heard of it). Last week I arrived at point of discussing hygienic > macros > (http://www

Re: how does Clojure macros work?

2009-06-26 Thread Rich Hickey
On Fri, Jun 26, 2009 at 9:22 AM, Michele Simionato wrote: > > On Jun 26, 9:53 am, Michele Simionato > wrote: >> I want to asset the status of Clojure >> macros with respect to hygiene. > > Some further experiment: > > $ clj > Clojure 1.1.0-alpha-SNAPSHOT > user=> (def x 42) > #'user/x > user=> (

Re: ClassNotFoundException turn up randomly at compilation

2009-06-26 Thread C. Florian Ebeling
> I randomly get ClassNotFoundExceptions when I try to compile a file. > I'm running the MacPorts packaged version 1.0.0 of Clojure on OS X > 10.5.7. (With JLine support.) I should probably mention the java version as well: Apple-bundled 1.6.0_13-b03-211 (64 bit) -- Florian Ebeling Twitter:

ClassNotFoundException turn up randomly at compilation

2009-06-26 Thread C. Florian Ebeling
Hi, I randomly get ClassNotFoundExceptions when I try to compile a file. This is a paste from the repl: Clojure 1.0.0- user=> (compile 'app.hello) java.lang.RuntimeException: java.lang.ClassNotFoundException: app.hello$exec__4 (NO_SOURCE_FILE:0) user=> (compile 'app.hello) app.hello I'm really

Re: how does Clojure macros work?

2009-06-26 Thread Michele Simionato
On Jun 26, 3:51 pm, Rich Hickey wrote: > By using quote, and not syntax-quote, you have written an > intentionally capturing macro Acc, I missed that. I have read the documentation of syntax-quote now: "" For Symbols, syntax-quote resolves the symbol in the current context, yielding a fully-qu

Re: Small question: inserting something at the beginning of a vector

2009-06-26 Thread samppi
Thanks for the replies, everyone. @Mr. Gilardi, this is for a one-time only thing. I have a function, called rep*, that builds up a vector from left to right. Another, separate function, called rep+, calls rep*, but it needs to slip in an element at the vector's beginning. I'm considering changi

Re: how does Clojure macros work?

2009-06-26 Thread Laurent PETIT
Hi, 2009/6/26 Michele Simionato > > > On Jun 26, 3:51 pm, Rich Hickey wrote: > > By using quote, and not syntax-quote, you have written an > > intentionally capturing macro > > Acc, I missed that. I have read the documentation of syntax-quote now: > > "" > For Symbols, syntax-quote resolves the

Re: how does Clojure macros work?

2009-06-26 Thread Meikel Brandmeyer
Hi, Am 26.06.2009 um 16:39 schrieb Michele Simionato: That means that I do not need gensym, I can just add a `#` to the identifiers I want to introduce hygienically, right? I guess this is what you meant by autogensym in the other post. A pretty cool idea, actually. Exactly, here a short real

Re: Small question: inserting something at the beginning of a vector

2009-06-26 Thread Meikel Brandmeyer
Hi, Am 26.06.2009 um 17:09 schrieb samppi: @Mr. Gilardi, this is for a one-time only thing. I have a function, called rep*, that builds up a vector from left to right. Another, separate function, called rep+, calls rep*, but it needs to slip in an element at the vector's beginning. Maybe you

executing tasks on a schedule

2009-06-26 Thread Stuart Halloway
I am working on a Clojure project that is becoming more and more schedule-oriented. So far I have been using Clojure's native concurrency constructs, but I am becoming tempted to use Java's concurrency primitives to get interruptability, etc. -- or maybe even wrap a Java library like Quart

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Raoul Duke
> He, being a fairly intelligent and pragmatic man, accepted my logic. "dibs!", i would sincerely very much like to hook up with your advisers and investors when i start my company! i mean, that sounded like an all-too-reasonable experience! :-) (so, you hiring?) sincerely. --~--~-~--~

Re: A website written using Clojure.

2009-06-26 Thread Jonathan Smith
On Jun 25, 3:59 pm, Berlin Brown wrote: > On Jun 25, 3:52 pm, Mike Hinchey wrote: > > > > > Instead of eval in the doseq, you could use a macro with a do block, > > something like: > > user> (defmacro deftags [tags] > >         `(do ~@(map (fn [tag] > >                       `(defn ~(symbol (str

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-26 Thread e
+1 for jecl On Thu, Jun 25, 2009 at 5:33 PM, Alex Combas wrote: > How about the name: jecl > > "jecl" breaks down: > > (j)ecl = (j)ava > j(ec)l = (ec)lipse > je(cl) = (cl)ojure > > jecl.net is not registered (yet) > > "develop clojure on eclipse with jecl" has a ring to it, I think > > ..and of

Re: Small question: inserting something at the beginning of a vector

2009-06-26 Thread Stephen C. Gilardi
On Jun 26, 2009, at 11:09 AM, samppi wrote: I'm considering changing rep+'s documentation to state that it will return a "collection" rather than a "vector", and then just use cons without vec. You might also consider describing it as a "seq". If you use "cons", the object returned will be

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Baishampayan Ghose
Raoul Duke wrote: >> He, being a fairly intelligent and pragmatic man, accepted my logic. > > "dibs!", i would sincerely very much like to hook up with your > advisers and investors when i start my company! i mean, that sounded > like an all-too-reasonable experience! :-) > > (so, you hiring?) W

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Raoul Duke
> We are hiring; but do you live in Mumbai, India? :) no, but i do know some folks around there (although they are all happy where they are, as far as i know). do you allow telecommuting from usa? ;-) best of luck with the venture. --~--~-~--~~~---~--~~ You recei

Bug: ClassNotFoundException with macro using private helper function.

2009-06-26 Thread Four of Seventeen
I had code something like this: (defn- foo [args] body) (defmacro bar [args] body) `(foo ~some-args (fn [~more-args] ~...@body))) and it complained that foo was not public when I invoked bar from outside its home namespace. OK, easy workaround, I thought: (defmacro bar [args] body) (let [

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-26 Thread Howard Lewis Ship
I favor the idea of picking a strong, evocative word and just using that. Pick a city, a sport team, the name of a piece of art ... just something bold and memorable. If your tool is good, people will associate it properly. When I'm naming projects, I get a white board and just start writing down

Re: Bug: ClassNotFoundException with macro using private helper function.

2009-06-26 Thread Four of Seventeen
This is odd. Doing a clean & build made this go away. After I did that, load-file also worked, and using the first workaround (let [x foo]) at that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To p

Running compojure in clojure eclipse plugin

2009-06-26 Thread Stephan Mühlstrasser
Hi, I'm not really familiar with compojure, but I was able to run Compojure in the REPL inside of the clojure eclipse plug-in by using the steps described under http://en.wikibooks.org/wiki/Compojure/Getting_Started as a guideline: - Built compojure from source as it is described under "Build fr

Displaying Clojure code on a Website

2009-06-26 Thread Kai
Hi all, I'm new to this discussion group and Clojure. I'm sharing the first "bigger-than-REPL" script that I've written because I haven't seen anything else like it for Clojure. It's a script that takes Clojure code as input and generates a pretty HTML version. You can view it here (I ran the scr

General Lisp Comment: side effects with Lisp oriented languages

2009-06-26 Thread BerlinBrown
One small issue I see with Lisp languages over something like Haskell where side effects are greatly minimized. I tend to write code in this style: - (when-let [seco-files (.getMergeFilesPrimary *main-global-state*)] (merge-memory-handler-primary prim-files)) Or something similar, you do

Re: executing tasks on a schedule

2009-06-26 Thread Berlin Brown
On Jun 26, 11:43 am, Stuart Halloway wrote: > I am working on a Clojure project that is becoming more and more > schedule-oriented. So far I have been using Clojure's native > concurrency constructs, but I am becoming tempted to use Java's > concurrency primitives to get interruptability, etc.

Re: Displaying Clojure code on a Website

2009-06-26 Thread Richard Newman
> I'm new to this discussion group and Clojure. I'm sharing the first > "bigger-than-REPL" script that I've written because I haven't seen > anything else like it for Clojure. It's a script that takes Clojure > code as input and generates a pretty HTML version. You can view it > here (I ran the sc

Re: [OT] Convincing others about Clojure

2009-06-26 Thread Gert Verhoog
On 26/06/2009, at 8:55 PM, Baishampayan Ghose wrote: > Well, the guy is a real startup veteran. I explained to him with some > help from a bunch of Paul Graham essays that we want to use Clojure > just > because it is "practically" more suitable for the problem at hand and > not because we are

Re: Convincing others about Clojure

2009-06-26 Thread fft1976
On Jun 24, 11:38 pm, Konrad Hinsen wrote: > I'd reply that you can always fall back to Java for time-critical   > stuff. Is this really relevant? You may fall back to Java for some of your procedure implementations, but your data structures that they need to work on would be the dynamically typ

Re: Small question: inserting something at the beginning of a vector

2009-06-26 Thread samppi
Thanks for the replies. Mr. Brandmeyer's solution is exactly what I needed; I don't really want to change rep+'s return value from a vector, which would sort of break backwards compatibility. On Jun 26, 8:25 am, Meikel Brandmeyer wrote: > Hi, > > Am 26.06.2009 um 17:09 schrieb samppi: > > > @Mr.

Re: how does Clojure macros work?

2009-06-26 Thread Konrad Hinsen
On 26.06.2009, at 15:22, Michele Simionato wrote: > Finally, as an unrelated question, is there an equivalent of macrolet > in Clojure? Not in Clojure itself, but there is an implementation in an external library, clojure.contrib.macro-utils: http://github.com/richhickey/clojure-contrib/blob/

Re: Displaying Clojure code on a Website

2009-06-26 Thread CuppoJava
Hi Kai, That is really cool! Do you mind if I use it on my webpage? As for coding style, I must say that yours is very clear. It was very easy to read through the whole thing. -Patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Displaying Clojure code on a Website

2009-06-26 Thread Kai
I fixed a bug that messed up spacing (ampersands weren't converted in html-pre-format), so be sure to use the latest version. Of course, feel free to use it on your webpage! ~ Kai On Jun 26, 9:09 pm, CuppoJava wrote: > Hi Kai, > That is really cool! Do you mind if I use it on my webpage? > > A

Re: Displaying Clojure code on a Website

2009-06-26 Thread CuppoJava
Thanks 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

The API docs are gone!

2009-06-26 Thread Four of Seventeen
I just went to check the API docs about something and they're gone! In fact, everything at clojure.org has been trashed. The site has apparently been vandalized. The vandals appear to have replaced every page on the site with some kind of a maintenance page copied from some unrelated site. Probab

Re: The API docs are gone!

2009-06-26 Thread CuppoJava
Are you sure? It resembles a regular site maintenance to me... --~--~-~--~~~---~--~~ 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 mem

Re: The API docs are gone!

2009-06-26 Thread Richard Newman
Clojure.org looks normal to me. I checked /api and the front page. --~--~-~--~~~---~--~~ 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 ne

Re: The API docs are gone!

2009-06-26 Thread Four of Seventeen
On Jun 26, 11:14 pm, CuppoJava wrote: > Are you sure? It resembles a regular site maintenance to me... It resembles a "regular site maintenance" for some website other than clojure.org. Not that it really matters why it is/was down. The API docs going down for any amount of time longer than a m

java.ext.dirs problem

2009-06-26 Thread Chouser
When I starting Clojure, I generally point -Djava.ext.dirs at a "classpaths" directory. That's where I dump jars, symlinks to jars, and symlinks to the 'src' and 'classes' directories of the various projects I have installed. I know that some people have had trouble with java.ext.dirs and instead

Re: The API docs are gone!

2009-06-26 Thread ataggart
On Jun 26, 9:12 pm, Four of Seventeen wrote: > Not that it really matters why it is/was down. The API docs going down > for any amount of time longer than a minute or so is bad bad news. ... > By contrast, in over a decade of usinghttp://java.sun.com/javase/6/docs/api/ > and its predecessors I

Re: The API docs are gone!

2009-06-26 Thread CuppoJava
It was a server maintenance for wikispaces.org which is the hosting site for the Clojure website. Nothing sinister about it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: java.ext.dirs problem

2009-06-26 Thread Laurent PETIT
While I'm far from a java classpath-related issues problem, I think I know enough to say that placing your libs in the java.ext.dirs classpath is a trick that could lead to problems. It's primary and sole intent is to hold extensions to the java API that then would be loaded with the core java AP

Re: Enlive questions

2009-06-26 Thread cody
On May 6, 12:36 am, Christophe Grand wrote: > Hello Ryan, > > rzeze...@gmail.com a écrit :> Either I've missed something, orEnlive*appears* > to have problems > > handling comment tags. > > Indeed. I pushed a fix, please tell me whether it works for you now. > > Thanks for the report. > > Chri

Re: executing tasks on a schedule

2009-06-26 Thread ataggart
What do you need that a cron job wouldn't provide? On Jun 26, 8:43 am, Stuart Halloway wrote: > I am working on a Clojure project that is becoming more and more   > schedule-oriented. So far I have been using Clojure's native   > concurrency constructs, but I am becoming tempted to use Java's