Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-14 Thread Jacobo Polavieja
El jueves, 14 de junio de 2012 03:18:29 UTC+2, Kevin Lynagh escribió: Jacobo, Using JavaScript from ClojureScript is very straightforward. There are a few points where interop is awkward, but that wasn't the main reason I wrote a new library (in Clojure). There were two primary

Re: so why it has to be so complicated / Longest Increasing Sub-Seq

2012-06-14 Thread Yoshinori Kohyama
Hi Andy and all, Here's mine with trying to separate steps. You can see each steps with commenting out later steps. (fn [coll] (- coll ; 1st. Make tails of coll. (#(take-while (comp not nil?) (iterate next %))) ; 2nd. Take only consecutive elements from the head for each

Re: If a protocol creates a Java interface under the covers...

2012-06-14 Thread Tassilo Horn
Jim - FooBar(); jimpil1...@gmail.com writes: On the upside I did not have to change much and now at least it reads nicer...however, on the down side executing a single move takes roughly double the time (~ 13ms instead of ~8ms before)... I quickly glanced over your code. Why do you still

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-14 Thread Kevin Lynagh
As to your first point and only to clarify, had you made it a wrapper for D3 and in a node.js application, there would still be no problem in using it server-side, am I right? Unfortunately, no---D3 requires a full DOM. Node.js is just the JavaScript engine. There are some fake DOM

Two Way DOM binding in clojurescript

2012-06-14 Thread Murtaza Husain
Hi, I would like to data in atoms to DOM elements in clojurescript. Are there any examples out there that demonstrate this ? Something like what knockout.js or angular.js provide. Thanks, Murtaza -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-14 Thread Jacobo Polavieja
El jueves, 14 de junio de 2012 08:39:19 UTC+2, Kevin Lynagh escribió: As to your first point and only to clarify, had you made it a wrapper for D3 and in a node.js application, there would still be no problem in using it server-side, am I right? Unfortunately, no---D3 requires a full

Re: Why isn't there a fold-right?

2012-06-14 Thread Tassilo Horn
Tassilo Horn tass...@member.fsf.org writes: r-reduce (let [f1 (apply comp* (take 100 (repeat inc))) f2 (apply comp (take 100 (repeat inc)))] (bench (f1 0) :verbose) (println ---) (bench (f2 0)

Re: Clojurescript (latest) advanced mode compilation = java.lang.ClassCastException ?

2012-06-14 Thread Dave Sann
It may take some time. I'll see what I can do. D On Thursday, 14 June 2012 00:09:49 UTC+10, David Nolen wrote: Does this problem only occur on a specific project? Can you create a minimal reproducible case? Thanks, David On Wed, Jun 13, 2012 at 7:54 AM, So far I can only confirm the

Re: If a protocol creates a Java interface under the covers...

2012-06-14 Thread nicolas.o...@gmail.com
(defn move The function responsible for moving Pieces. Each piece knows how to move itself. If trying? is true, there will be no histiry of the new state of the board. Returns the new board.  ^clojure.lang.PersistentVector [game mappings p coords] {:pre [(satisfies? Piece p)]}  ;safety

Re: If a protocol creates a Java interface under the covers...

2012-06-14 Thread Jim - FooBar();
On 14/06/12 10:01, nicolas.o...@gmail.com wrote: There should not be any atom in this. The function would be more reusable if it take a board and return a board without changing any atom. (You will still be to express the atom change around it but you could also use to try and build a tree

Re: If a protocol creates a Java interface under the covers...

2012-06-14 Thread Jim - FooBar();
On 14/06/12 07:27, Tassilo Horn wrote: I quickly glanced over your code. Why do you still have `undo`? That shouldn't be needed in a fully immutable world. If you make a move just for trying out, then simply don't reset! your atom with the new value of the current board. Undo is still there

Re: If a protocol creates a Java interface under the covers...

2012-06-14 Thread Jim - FooBar();
On 14/06/12 06:38, Philip Potter wrote: Another reason the interface exists is for interoperability - if you want a java class to participate in the protocol, you do it by implementing the corresponding interface. Phil People suggested that I should not consume the interface produced by

Re: Clojurescript (latest) advanced mode compilation = java.lang.ClassCastException ?

2012-06-14 Thread Dave Sann
I (think) I have tracked it down to the following section of code from jayq.core (simplified) --- (ns jayq.core) (extend-type js/jQuery IIndexed (-nth [this n] (when ( n (count this)) (.slice this n (inc n (-nth [this n not-found] (if ( n

'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Jim - FooBar();
(doto foo (.bar x) (.baz y) (dotimes [i 10] (.zab g))) won't work because foo is substituted as the second argument of 'dotimes'! It has to be 'do' instead of 'doto'... very subtle trap... Jim -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: If a protocol creates a Java interface under the covers...

2012-06-14 Thread Philip Potter
On 14 June 2012 11:17, Jim - FooBar(); jimpil1...@gmail.com wrote: On 14/06/12 06:38, Philip Potter wrote: Another reason the interface exists is for interoperability - if you want a java class to participate in the protocol, you do it by implementing the corresponding interface. Phil

[ANN] Tower, simple i18n library for Clojure

2012-06-14 Thread Peter Taoussanis
Hi all, Just put up an early release of a little i18n library that some of you might find useful. It's on Github (https://github.com/ptaoussanis/tower) and Clojars ( https://clojars.org/tower). Features (taken from the readme): * Consistent, lightweight wrappers for standard Java localization

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-14 Thread Paul deGrandis
I've been building out substantial ClojureScript apps for a few months now. Previously I had written an HTML5 game engine, so I'm no stranger to lots of JavaScript. My CLJS code base is smaller, easier to organize/maintain, more functional and declarative, and boasts a level of server-side

Iterate and stack overflow

2012-06-14 Thread vmargioulas
Can someone explain why ... iterating over a sequence cause a stack overflow (first (drop 1000 (iterate (partial map inc) (range 10 - java.lang.StackOverflowError ...but iterating over a vector works ok? (first (drop 1000 (iterate (comp vec (partial map inc)) (range 10 - [1000 1001 1002

Re: Iterate and stack overflow

2012-06-14 Thread Dave Sann
It doesn't overflow for me. user= (first (drop 1000 (iterate (partial map inc) (range 10 (1000 1001 1002 1003 1004 1005 1006 1007 1008 1009) On Thursday, 14 June 2012 22:52:33 UTC+10, vmargioulas wrote: Can someone explain why ... iterating over a sequence cause a stack overflow

Re: Iterate and stack overflow

2012-06-14 Thread Dave Sann
ah...but does for 1 On Thursday, 14 June 2012 22:58:58 UTC+10, Dave Sann wrote: It doesn't overflow for me. user= (first (drop 1000 (iterate (partial map inc) (range 10 (1000 1001 1002 1003 1004 1005 1006 1007 1008 1009) On Thursday, 14 June 2012 22:52:33 UTC+10, vmargioulas

Re: Iterate and stack overflow

2012-06-14 Thread Dave Sann
I suspect that the answer is the use of partial and the implementation of iterate with (comp vec... you force realisation of the vector without this I think you get (partial map (partial map (partial ) as f is repeatedly applied if you do this, (first (drop 10 (iterate #(apply list

Re: Iterate and stack overflow

2012-06-14 Thread Dave Sann
also (first (drop 10 (iterate #(doall (map inc %)) (range 10 so the better answer is probably - because map is lazy On Thursday, 14 June 2012 23:06:27 UTC+10, Dave Sann wrote: I suspect that the answer is the use of partial and the implementation of iterate with (comp vec... you

Re: Iterate and stack overflow

2012-06-14 Thread vmargioulas
Thanks, this explains the stack overflow On Thursday, June 14, 2012 4:12:28 PM UTC+3, Dave Sann wrote: also (first (drop 10 (iterate #(doall (map inc %)) (range 10 so the better answer is probably - because map is lazy On Thursday, 14 June 2012 23:06:27 UTC+10, Dave Sann wrote:

Re: Central screwup

2012-06-14 Thread Stuart Sierra
Is there anyone on the Clojure/core team with a contact among those who run Central who could get them to look into this? I'm on the Sonatype OSSRH mailing list: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide (mailing list addresses at the bottom)

Re: ClojureScript instead of CoffeeScript for complete web app development?

2012-06-14 Thread Jacobo Polavieja
El jueves, 14 de junio de 2012 14:42:14 UTC+2, Paul deGrandis escribió: I've been building out substantial ClojureScript apps for a few months now. Previously I had written an HTML5 game engine, so I'm no stranger to lots of JavaScript. My CLJS code base is smaller, easier to

IllegalStateException I/O in transaction in REPL

2012-06-14 Thread Daniil Mirylenka
I'm trying to insert some values into MySQL db, via clojure.java.jdbc. When I call my code from Leiningen REPL, I get: IllegalStateException I/O in transaction clojure.java.jdbc.internal/transaction* (internal.clj:212). The same code runs without exception when executed outside repl (in my

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread David Della Costa
Just saw this thread. I went through something similar recently: I'm a long-time emacs user just getting into Clojure, so naturally I set it up with emacs. I set it up with Leiningen (a 2.0.0 preview version), and while I found it relatively painless, I did have a few problems mostly with Emacs.

Re: Broken Sequences screencast

2012-06-14 Thread David Della Costa
Hey folks, I see that this was never answered, but it remains a problem. I've tried viewing the video on blip (http://blip.tv/clojure/clojure-sequences-740581) as well as downloading via iTunes, but no dice--I get about 8 seconds of Rich introducing the topic and then nothing. I'd love to

Re: How about 'nth' accepts maps?

2012-06-14 Thread hyPiRion
On Tuesday, June 12, 2012 12:54:08 PM UTC+2, Chris Ford wrote: I guess the question should then be, should nth call seq on its argument? This is horrible for performance. For a sequence, nth will run in O(n) time, whereas it for any indexed data structure (vectors, strings, arraylists, etc.)

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread John Gabriele
On Jun 13, 10:58 pm, Sean Corfield seancorfi...@gmail.com wrote: On Wed, Jun 13, 2012 at 7:45 PM, Sean Corfield seancorfi...@gmail.com wrote: We definitely need improvements in the official getting started documentation. Starting here - http://dev.clojure.org/display/doc/Getting+Started- any

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Tassilo Horn
Jim - FooBar(); jimpil1...@gmail.com writes: (doto foo (.bar x) (.baz y) (dotimes [i 10] (.zab g))) won't work because foo is substituted as the second argument of 'dotimes'! The docs clearly state that. It has to be 'do' instead of 'doto'... Then, you need (.bar foo x), (.baz foo

Re: Broken Sequences screencast

2012-06-14 Thread Kevin Ilchmann Jørgensen
From the rss. http://blip.tv/file/get/Richhickey-ClojureSequences284.mov The sound dont get any better thru. /Kevin On Thu, Jun 14, 2012 at 4:11 AM, David Della Costa ddellaco...@gmail.com wrote: Hey folks, I see that this was never answered, but it remains a problem. I've tried viewing the

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Aaron Cohen
On Thu, Jun 14, 2012 at 8:09 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: (doto foo  (.bar x)  (.baz y)  (dotimes [i 10] (.zab g))) won't work because foo is substituted as the second argument of 'dotimes'! It has to be 'do' instead of 'doto'... very subtle trap... Jim I think the

Re: IllegalStateException I/O in transaction in REPL

2012-06-14 Thread Meikel Brandmeyer (kotarak)
Hi, the exception probably stems from the fact that you do the database interaction inside a dosync transaction. Kind regards Meikel -- 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

Re: Clojurescript - Javascript constructor and namespace with the same name problem

2012-06-14 Thread David Nolen
:require now no longer requires :as. :require now also supports :refer (thanks Michal!) which brings us in line with Clojure on the JVM. Still discussing the implications of doing :import (CLJS-312). David On Mon, Jun 11, 2012 at 9:36 PM, Michał Marczyk michal.marc...@gmail.comwrote: Patch

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Jim - FooBar();
On 14/06/12 15:10, Tassilo Horn wrote: The docs clearly state that. Where? I don't see any warnings...It does say ... calls all of the methods and functions with the value of x supplied at the front of the given arguments but it wasn't obvious to me at first! user= (doc dotimes)

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread David Nolen
On Thu, Jun 14, 2012 at 10:39 AM, Jim - FooBar(); jimpil1...@gmail.comwrote: Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments that's in the docstring for doto. but dotimes is not a method or a function is it? :) David

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Jim - FooBar();
well, no... :-) Jim On 14/06/12 15:52, David Nolen wrote: On Thu, Jun 14, 2012 at 10:39 AM, Jim - FooBar(); jimpil1...@gmail.com mailto:jimpil1...@gmail.com wrote: Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given

Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Jacobo Polavieja
Hi! I've just started learning Clojure today. I've started reading Clojure - Functional Programming for the JVM ( http://java.ociweb.com/mark/clojure/article.htmlhttp://java.ociweb.com/mark/clojure/article.html#Collections ). Anyway, on the collections part (

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread David Nolen
not-every? is a predicate (note the ?) some is not. On Thu, Jun 14, 2012 at 11:31 AM, Jacobo Polavieja jacobopolavi...@gmail.com wrote: Hi! I've just started learning Clojure today. I've started reading Clojure - Functional Programming for the JVM (

Re: How about 'nth' accepts maps?

2012-06-14 Thread Tassilo Horn
hyPiRion lorange.j...@gmail.com writes: If you really need nth for your hash map in the way you describe and don't need to remove elements from the map, then I suggest creating a new data structure with a vector and a hash map. There's the ordered lib on clojars which provides sets and maps

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Tassilo Horn
Jacobo Polavieja jacobopolavi...@gmail.com writes: Hi Jacobo, (not-every? #(instance? String %) stooges) ; - false (some #(instance? Number %) stooges) ; - nil Is there a reason why (some) doesn't return false also? `some` is no predicate (else it would have a ? appended). It simply

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Jacobo Polavieja
Thank you both! I had the epiphany now and realized it is what you both stated. But you had already answered! So quick :). I think I've tried too run too much and have read through too fast. All morning setting up Clojure and learning Clojure. It's fun but my brain may now need some rest...

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread David Nolen
Definitely something that should not written as a macro :) David On Thu, Jun 14, 2012 at 1:14 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: you can always make your own with a little macro but if you just started learning today you may want to stick with some... I, like you, wanted a

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Jim - FooBar();
I don't see why not if you really really need to return true/false... Of course as Tassilo said nil is falsey so it is unlikely that you would ever need to do that... Jim On 14/06/12 18:16, David Nolen wrote: Definitely something that should not written as a macro :) David On Thu, Jun 14,

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread nicolas.o...@gmail.com
(defmacro in? Returns true if colle contains elm, false otherwise. [colle elm] `(if (some #{~elm} ~colle) true false)) Yes. Should not be a macro. (There is no reason for it to be a macro). On top of that, it is not very often useful to convert nil to false as clojure understands

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread nicolas.o...@gmail.com
On Thu, Jun 14, 2012 at 6:19 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: I don't see why not if you really really need to return true/false... Because it can be written as a function. Macro are only for things that cannot be easily written as functions. (And then it should be backed by

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Jim - FooBar();
On 14/06/12 18:20, nicolas.o...@gmail.com wrote: (defn to-bool [x] (if x true false)) and use it when necessary. why add the extra overhead of potentially boxing/unboxing x in such a simple case? Its not like the macro is getting out of control...Its a one liner... Jim -- You received

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread nicolas.o...@gmail.com
why add the extra overhead of potentially boxing/unboxing x in such a simple case? Its not like the macro is getting out of control...Its a one liner... Because functions are first class and not macros. Ex: (map to-bool l) -- You received this message because you are subscribed to the

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread Phil Hagelberg
On Wed, Jun 13, 2012 at 8:01 PM, David Della Costa ddellaco...@gmail.com wrote: I also think that, at present, while coming in through Leiningen is definitely the most painless way to do things (I'm really loving it actually, as a Ruby dev it kind of seems like rvm + bundler + rake all wrapped

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Jim - FooBar();
I have a functionize macro if I ever want to do that with a macro but I think we are getting off topic here... all I'm saying is that if I want to keep a loop very tight and want to perform a couple of checks inline, why clutter the body of the loop with 'if's or 'some's or whatever...you

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Tassilo Horn
Jim - FooBar(); jimpil1...@gmail.com writes: (defmacro in? Returns true if colle contains elm, false otherwise. [colle elm] `(if (some #{~elm} ~colle) true false)) Except for the complains that this doesn't need to be a macro (which I agree with), it is also wrong. user (in? [nil

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Jim - FooBar();
nice catch and point taken... however the exact same thing would happen if this was a function...it's just wrong ! Jim On 14/06/12 19:32, Tassilo Horn wrote: Jim - FooBar();jimpil1...@gmail.com writes: (defmacro in? Returns true if colle contains elm, false otherwise. [colle elm]

Re: Is there a reason why 'some' returns nil instead o false?

2012-06-14 Thread Stuart Halloway
(doc boolean) Cheers, Stu Stuart Halloway Clojure/core http://clojure.com (defmacro in? Returns true if colle contains elm, false otherwise. [colle elm] `(if (some #{~elm} ~colle) true false)) Yes. Should not be a macro. (There is no reason for it to be a macro). On top of that,

Re: Clojure Sticker

2012-06-14 Thread Rich Hickey
No, you are not allowed to reproduce the Clojure logo and put it up for sale. I'd be happy to set up an official way to get stickers/shirts etc. Rich On Jun 11, 2012, at 6:23 PM, Sven Johansson wrote: I've been trawling the internet for Clojure stickers before and come up empty. If there's

Re: Clojure Sticker

2012-06-14 Thread Sean Neilan
I'd buy one. On Thu, Jun 14, 2012 at 1:52 PM, Rich Hickey richhic...@gmail.com wrote: No, you are not allowed to reproduce the Clojure logo and put it up for sale. I'd be happy to set up an official way to get stickers/shirts etc. Rich On Jun 11, 2012, at 6:23 PM, Sven Johansson wrote:

Re: Clojure Sticker

2012-06-14 Thread Joseph Smith
Excellent. I'd like a sticker for my notebook. :) --- Joseph Smith j...@uwcreations.com @solussd On Jun 14, 2012, at 11:52 AM, Rich Hickey richhic...@gmail.com wrote: No, you are not allowed to reproduce the Clojure logo and put it up for sale. I'd be happy to set up an official way to get

Re: Clojurescript (latest) advanced mode compilation = java.lang.ClassCastException ?

2012-06-14 Thread David Nolen
Thank you! http://dev.clojure.org/jira/browse/CLJS-315 On Thu, Jun 14, 2012 at 6:43 AM, Dave Sann daves...@gmail.com wrote: I (think) I have tracked it down to the following section of code from jayq.core (simplified) --- (ns jayq.core) (extend-type js/jQuery

Re: Clojure Sticker

2012-06-14 Thread Sven Johansson
On Thu, Jun 14, 2012 at 8:52 PM, Rich Hickey richhic...@gmail.com wrote: No, you are not allowed to reproduce the Clojure logo and put it up for sale. I'd be happy to set up an official way to get stickers/shirts etc. Thanks - that'd be much preferable! Regards/Sven -- You received this

Re: Type hint for vector element?

2012-06-14 Thread Aaron Cohen
On Wed, Jun 13, 2012 at 8:22 PM, Warren Lynn wrn.l...@gmail.com wrote: It is very common for all elements in a vector to be always of the same type. Is there any way to hint the type to Clojure? Does such hint can even improve performance? Thank you. In general, not through type hints.

Re: Clojure Sticker

2012-06-14 Thread Aaron Cohen
On Thu, Jun 14, 2012 at 2:52 PM, Rich Hickey richhic...@gmail.com wrote: No, you are not allowed to reproduce the Clojure logo and put it up for sale. I'd be happy to set up an official way to get stickers/shirts etc. Rich I just wanted to mention that the American Apparel t-shirt that was

Re: IllegalStateException I/O in transaction in REPL

2012-06-14 Thread dmirylenka
Could you please explain a bit more? I don't have any dosync in my code. Daniil On Thursday, June 14, 2012 4:17:46 PM UTC+2, Meikel Brandmeyer (kotarak) wrote: Hi, the exception probably stems from the fact that you do the database interaction inside a dosync transaction. Kind regards

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread fenton
I like the idea of taking care of copyright properly, thanks Sean for the links to those pages. I think the black and white split, docs = confluence, code = github, is not so good. I think John's point about the *.md files being a very good place for documentation. I think the right way to

Re: Clojure Sticker

2012-06-14 Thread Bruce Durling
Rich, On Thu, Jun 14, 2012 at 7:52 PM, Rich Hickey richhic...@gmail.com wrote: No, you are not allowed to reproduce the Clojure logo and put it up for sale. I'd be happy to set up an official way to get stickers/shirts etc. +1 for being able to buy an official one. cheers, Bruce -- You

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Walter Tetzner
On Thursday, June 14, 2012 8:09:50 AM UTC-4, Jim foo.bar wrote: It has to be 'do' instead of 'doto'... Well, if you want to be able to use doto, you could do something like (doto foo (.bar x) (.baz y) (#(dotimes [i 10] (.zab % g -- You received this message because you are

Re: Clojure Sticker

2012-06-14 Thread Jason Lewis
I, for one, would be happy to collaborate on an open-source Clojure ecommerce app, if it meant Rich would sell us stickers sooner. (only half joking) Jason On Jun 14, 2012 5:33 PM, Bruce Durling b...@otfrom.com wrote: Rich, On Thu, Jun 14, 2012 at 7:52 PM, Rich Hickey richhic...@gmail.com

Re: IllegalStateException I/O in transaction in REPL

2012-06-14 Thread Meikel Brandmeyer
Hi, Am 14.06.2012 um 22:33 schrieb dmirylenka: Could you please explain a bit more? I don't have any dosync in my code. transaction* contains an io! form which throws such an exception when called in a dosync. How does the code look like, which does not work? Kind regards Meikel -- You

Re: Clojure Sticker

2012-06-14 Thread Jim - FooBar();
On 14/06/12 19:52, Rich Hickey wrote: I'd be happy to set up an official way to get stickers/shirts etc. zazzle.com sells t-shirts already...not sure whether its legit or not though... Jim -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Andy Fingerhut
On Jun 14, 2012, at 7:59 AM, Jim - FooBar(); wrote: well, no... :-) Jim On 14/06/12 15:52, David Nolen wrote: On Thu, Jun 14, 2012 at 10:39 AM, Jim - FooBar(); jimpil1...@gmail.com wrote: Evaluates x then calls all of the methods and functions with the value of x supplied at the

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Jim - FooBar();
why not even go a bit further and add a tiny warning with regards to evaluating macros as well? I mean I don't know about you guys but I've not been 'burned' before when trying to use macros inside macros and the error message is not immediately obvious what it means...it does say that the

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread Phil Hagelberg
On Thu, Jun 14, 2012 at 2:09 PM, fenton fenton.trav...@gmail.com wrote I'm not going to give up the wonderful prettiness that github does with a line like: ```clojure (defn myfunc [x] (+ 2 x)) ``` which i can't do with confluence.  This group is about a programming language, nice

Re: Using read-string and macros together

2012-06-14 Thread Stephen Compall
On Thu, 2012-06-14 at 00:49 -0700, Rob Harrop wrote: I had almost resigned myself to that fact that this would require eval, but I wanted to exhaust all macro options first. As a compromise, you might consider a limited evaluator, such as used by #=, or a sandboxed evaluator, such as the IRC

Re: IllegalStateException I/O in transaction in REPL

2012-06-14 Thread Stephen Compall
On Thu, 2012-06-14 at 13:33 -0700, dmirylenka wrote: Could you please explain a bit more? I don't have any dosync in my code. Look through your backtrace for a call to clojure.lang.LockingTransaction.runInTransaction. Its caller is using dosync. -- Stephen Compall ^aCollection allSatisfy:

ANN: lambic v. 0.1.0

2012-06-14 Thread Robert Levy
This announcement is more of a call for suggestions (even pull requests if you are moved to do so) as there's not much to it yet, just enough to to demonstrate the concept for simpler transformations. I'm thinking of how best to go about supporting a wider range of sequence transformations.

Re: 'dotimes' will not work inside a 'doto'...

2012-06-14 Thread Andy Fingerhut
I highly recommend clojuredocs.org for adding examples of pitfalls/traps. I've added several there myself, e.g. for clojure.core/future (and also clojure.core/pmap, clojure.java.shell/sh): http://clojuredocs.org/clojure_core/clojure.core/future It takes only a few minutes to do so. Andy On

Re: ANN: lambic v. 0.1.0

2012-06-14 Thread kovas boguta
Very cool! I'm working on a very similar thing, but aimed at reference types and with the ability for incremental transformations. Specifying this kind of thing declaratively opens up the door to a lot of possibilities. On Thu, Jun 14, 2012 at 7:44 PM, Robert Levy r.p.l...@gmail.com wrote:

Re: Why is lein so slow?

2012-06-14 Thread sailormoo...@gmail.com
I found lein repl is slower and most of time it just freezes. -- 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

Re: Why is lein so slow?

2012-06-14 Thread thenwithexpandedwingshesteershisflight
me too! And using lein cljsbuild auto takes several seconds to compile, whereas cljsc/build + some file copying for shared code takes under a second. Also, I've found cljsbuild auto sometimes doesn't compile my code completely. I can't figure out the pattern, but I edit something in one place

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread Tim Jones
On Thu, Jun 14, 2012 at 10:31:44AM -0700, Phil Hagelberg wrote: On Wed, Jun 13, 2012 at 8:01 PM, David Della Costa ddellaco...@gmail.com wrote:  Similarly, it's easy to get lost (as a beginner) between namespace issues with packages and how to set things up properly with Leiningen.  It'd

Re: Why is lein so slow?

2012-06-14 Thread Andy Fingerhut
On Jun 13, 2012, at 5:27 PM, Warren Lynn wrote: I cannot help notice that leinengen seems quite slow. Even lein help takes 8 seconds to finish printing all the information. I am using version 2 on Windows 7(that .bat file). Can anyone explain what is going on? Or is it just me? Thank you.

Re: so why it has to be so complicated / Longest Increasing Sub-Seq

2012-06-14 Thread Tyler Perkins
Here's what I came up with, a pretty functional approach: (fn [l] (let [lt(partial apply ) pairs (- (map vector l (rest l)) (partition-by lt) (filter (comp lt first))) max-count (apply max 0 (map count pairs))] (-

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread Korny Sietsma
Yes emacs is very weird for newbies, but most clojurians use it. I tend to think this is an unnecessary barrier for entry - yes, people would be more productive in the long run using emacs, but it has it's own big learning curve, and is definitely not necessary to get started in clojure. It's

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread Sean Corfield
On Thu, Jun 14, 2012 at 6:52 PM, Korny Sietsma ko...@sietsma.com wrote:  It's great to have comprehensive instructions for people who want the full power of emacs - but we should also make sure there are clear getting started instructions for people who are happy with a smart text editor and a

clojure.core.cache status?

2012-06-14 Thread Sean Corfield
I'm at a point where I'd like to start using clojure.core.cache (aren't I brave? :) I tried 0.5.0 which is the stable version - and had a bit of a fight with the docs because 0.5.0 has quite a different API to what's described here:

Re: Broken Sequences screencast

2012-06-14 Thread David Della Costa
Kevin, thanks very much! When I went to load that in a browser, I got the message This video is only available in the Blip player... but I was successfully able to download the video via curl. You're right, there's a buzzing sound throughout, unfortunately...ah well. Thanks again-- Dave

Re: A tutorial for how to setup your clojure development environment for: Emacs, Leiningen and Linux.

2012-06-14 Thread David Della Costa
Hey Phil, thanks for the response. trying to navigate whether to use 1.x or 2.x preview is a bit confusing--and the variety of docs available for setting things up is confusing. Yeah, as of the last release we're pretty much advising everyone to go with 2.x, but the docs still need to be

Announcing KR v1.4.2 :: RDF and SPARQL support using clojure data / interfaces

2012-06-14 Thread Kevin Livingston
Hello everyone, I just wanted to announce the open-sourcing of a RDF and SPARQL (and more) library that has been under development and use for quite a while in our lab. It supports the use of clojure symbols and lists as rdf resources and triples, and it can form triple patterns into sparql

Re: Central screwup

2012-06-14 Thread Nelson Morris
On Thu, Jun 14, 2012 at 8:38 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Is there anyone on the Clojure/core team with a contact among those who run Central who could get them to look into this? I'm on the Sonatype OSSRH mailing list:

Enfocus issues

2012-06-14 Thread Andreas Kostler
Hi everyone, I finally decided to give clojurescript a spin. Unfortunately, the momentum died before I even got the ball running. I'm trying to replicate the canonical example on the enfocus website using lein-cljsbuild [0.2.1] and enfocus [0.9.1-SNAPSHOT]: (ns my.namespace (:require

Re: Enfocus issues

2012-06-14 Thread David Nolen
On Fri, Jun 15, 2012 at 1:23 AM, Andreas Kostler andreas.koest...@leica-geosystems.com wrote: (set! (.onload js/window) start) Should be (set! (.-onload js/window) start) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Enfocus issues

2012-06-14 Thread Andreas Kostler
There you go...wrong on the example-page then. Thanks David On 15 June 2012 15:00, David Nolen dnolen.li...@gmail.com wrote: On Fri, Jun 15, 2012 at 1:23 AM, Andreas Kostler andreas.koest...@leica-geosystems.com wrote: (set! (.onload js/window) start) Should be (set! (.-onload