Re: [viewing clojure datastructures] Is there something better than clojure.inspector?

2012-08-23 Thread Denis Labaye
at which point? $ lein deps $ lein repl user= (use 'clj-ns-browser.sdoc) user= (sdoc) On Thu, Aug 23, 2012 at 4:48 AM, blackblock mathn...@gmail.com wrote: I get this with Lein2 with lein repl: IllegalStateException escape-html already refers to: #'hiccup.core/escape-html in namespace:

Re: [viewing clojure datastructures] Is there something better than clojure.inspector?

2012-08-23 Thread Denis Labaye
On Thu, Aug 23, 2012 at 8:39 AM, Denis Labaye denis.lab...@gmail.comwrote: at which point? $ lein deps $ lein repl user= (use 'clj-ns-browser.sdoc) user= (sdoc) On Thu, Aug 23, 2012 at 4:48 AM, blackblock mathn...@gmail.com wrote: I get this with Lein2 with lein repl:

Re: real-world usage of reducers?

2012-08-23 Thread nicolas.o...@gmail.com
If it is so slow, that's maybe because the branching factor is very high. Could you have an atom incremented in your evaluation function, or in next level, to check how many boards are generated for level 2 or 3? (At least this could give an approximate time for computing each board. (83 - 8) /

Re: real-world usage of reducers?

2012-08-23 Thread Jim - FooBar();
On 23/08/12 09:35, nicolas.o...@gmail.com wrote: If it is so slow, that's maybe because the branching factor is very high. Could you have an atom incremented in your evaluation function, or in next level, to check how many boards are generated for level 2 or 3? (At least this could give an

Re: dumping maps out to XML

2012-08-23 Thread semperos
The following is a start: http://clojuredocs.org/clojure_core/clojure.xml/emit-element The :tag, :attrs, :content trio is a common pattern in Clojure libraries that deal with XML. -Daniel On Wednesday, August 22, 2012 9:40:28 PM UTC-4, larry google groups wrote: Forgive me if this has been

Re: dumping maps out to XML

2012-08-23 Thread Denis Labaye
On Thu, Aug 23, 2012 at 3:40 AM, larry google groups lawrencecloj...@gmail.com wrote: Forgive me if this has been asked before. I am a beginner. I have a data structure that is composed of maps nested inside of a map. What is the easiest way to dump this out as XML? Why do you want to do

Re: Parser combinators in parsatron

2012-08-23 Thread Alexsandro Soares
Ok. Thanks for the answer. Is there any way to get the line and column? For example, in this parser (defparser ident [] ( (letter) (many (either (letter) (digit) I want the token and the initial line and column. How can I change this code? Cheers, Alex -- You received this message

Re: Parser combinators in parsatron

2012-08-23 Thread Nate Young
On Thu, Aug 23, 2012 at 9:24 AM, Alexsandro Soares prof.asoa...@gmail.com wrote: Ok. Thanks for the answer. Is there any way to get the line and column? The Parsatron doesn't have any builtin facilities for extracting line numbers from tokens, you'd have to keep track of the number of newline

Re: Deprecation of Swank Clojure, long live nrepl.el

2012-08-23 Thread Warren Lynn
Does anyone know how to let lein2 to use the latest nrepl server (beta9 for now). It seems right now (preview8) it is using beta8. I am eager to find out if beta9 fixed the ac-nrepl exception on namespace completion (according to ac-nrepl issue tracking, that is caused by the server). Thank

Re: Deprecation of Swank Clojure, long live nrepl.el

2012-08-23 Thread Chas Emerick
Just adding [org.clojure/tools.nrepl 0.2.0-beta9] to your project dependencies should do it. Can you point me to this ac-nrepl issue that may be server-related? - Chas On Aug 23, 2012, at 10:59 AM, Warren Lynn wrote: Does anyone know how to let lein2 to use the latest nrepl server (beta9

Re: What is the meaning of :while in a for ?

2012-08-23 Thread Andy Fingerhut
I've added some examples of :when and :while, including those given by Herwig and Tassilo in this thread, at ClojureDocs: http://clojuredocs.org/clojure_core/clojure.core/for Note: Anyone with a free account can add/edit examples on that site. Andy On Aug 21, 2012, at 8:34 AM,

Re: What is the meaning of :while in a for ?

2012-08-23 Thread Ambrose Bonnaire-Sergeant
Thanks Andy, that's awesome. On Thu, Aug 23, 2012 at 11:22 PM, Andy Fingerhut andy.finger...@gmail.comwrote: I've added some examples of :when and :while, including those given by Herwig and Tassilo in this thread, at ClojureDocs: http://clojuredocs.org/clojure_core/clojure.core/for Note:

Re: What is the meaning of :while in a for ?

2012-08-23 Thread nicolas.o...@gmail.com
That's amazing. Thanks. On Thu, Aug 23, 2012 at 4:22 PM, Andy Fingerhut andy.finger...@gmail.com wrote: I've added some examples of :when and :while, including those given by Herwig and Tassilo in this thread, at ClojureDocs: http://clojuredocs.org/clojure_core/clojure.core/for Note:

Re: Deprecation of Swank Clojure, long live nrepl.el

2012-08-23 Thread Tim King
On Thu, Aug 23, 2012 at 8:19 AM, Chas Emerick c...@cemerick.com wrote: Just adding [org.clojure/tools.nrepl 0.2.0-beta9] to your project dependencies should do it. Can you point me to this ac-nrepl issue that may be server-related? - Chas I don't think it is nREPL server related. It has

Re: Parser combinators in parsatron

2012-08-23 Thread Alexsandro Soares
Hi Nate, Can you provide the code for this? Thanks, Alex 2012/8/23 Nate Young youn...@gmail.com On Thu, Aug 23, 2012 at 9:24 AM, Alexsandro Soares prof.asoa...@gmail.com wrote: Ok. Thanks for the answer. Is there any way to get the line and column? The Parsatron doesn't have any

Re: Rich's The Value of Values and REST

2012-08-23 Thread vemv
There are few -if any- concepts attached to REST; it is just a low-level, ideologically-neutral technique. There is more than one way to do it, hence you really can't talk 'against' it any more than you can talk against hashmaps, for instance. That said, getting RESTful design right is pretty

Re: real-world usage of reducers?

2012-08-23 Thread Jim - FooBar();
Well I've got some results!!! Firstly and more importantly, it was a great idea to put all the logical moves of the pieces on a table (2 level nested map). There is absolutely no need to recalculate them every time! nice catch Nicolas... the profiler now shows some 9000 less objects and

Re: Deprecation of Swank Clojure, long live nrepl.el

2012-08-23 Thread Warren Lynn
I don't think it is nREPL server related. It has to do with with clojure.complete and lein repl. https://github.com/kingtim/nrepl.el/issues/63 -Tim Thanks. I did not understand it correctly. I will wait for lein to be updated. -- You received this message because you are

Re: real-world usage of reducers?

2012-08-23 Thread Jim - FooBar();
On 23/08/12 20:23, Jim - FooBar(); wrote: But both these fns should only be called n times (where n is the depth). now this is completely wrong!!! next-level should be called on every single node!!! 8421 times for level 2... Jim -- You received this message because you are subscribed to

Re: dumping maps out to XML

2012-08-23 Thread larry google groups
(def m {:person {:firstname john :lastname doe}}) (spit /home/d/m.clj m) (read-string (slurp /home/d/m.clj)) at repl: {:person {:firstname john, :lastname doe}} Good lord! How long has this been going on? On Thursday, August 23, 2012 9:39:43 AM UTC-4, Denis Labaye wrote: On Thu, Aug

Re: dumping maps out to XML

2012-08-23 Thread larry google groups
semperos, thanks. I might for now stick with Denis's suggestion, as it is simple, but the clojure docs you point out will be useful when I get more ambitious. On Thursday, August 23, 2012 8:21:09 AM UTC-4, semperos wrote: The following is a start:

Clojurescript, is it ready yet?

2012-08-23 Thread Blake Miller
This is somewhat related, though it's not exactly what the OP asked about. This compiles with GWT: https://github.com/blak3mill3r/percolator/blob/master/play/src/com/whatsys/test.clj Also I wanted to point out that you could export a public interface with the GWT compiler and call it with

Re: Gwt-Clojure - lightweight browser implementation

2012-08-23 Thread Blake Miller
I realize this is an old thread ... and the blog link about the gwt-clojure project is dead. I just wanted to mention that I'm working on something similar, with a somewhat different approach: This one is a java metaprogramming toolkit written in clojure. It turns clojure forms into java

Dart

2012-08-23 Thread Jacob Goodson
Anyone thinking of targeting dart with clojure? -- 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

Re: [viewing clojure datastructures] Is there something better than clojure.inspector?

2012-08-23 Thread Stuart Sierra
Somewhat-related, I started working on a graphical pretty-printer library for ClojureScript: https://github.com/stuartsierra/cljs-formatter Here's a screenshot: https://github.com/stuartsierra/cljs-formatter/blob/master/screenshot-1.png -S -- You received this message because you are

Re: Dart

2012-08-23 Thread David Nolen
On Wed, Aug 22, 2012 at 1:09 PM, Jacob Goodson submissionfight...@gmx.com wrote: Anyone thinking of targeting dart with clojure? I haven't heard of anything. Would be an interesting target but perhaps a bit much if you're actually trying to reach JS clients. David -- You received this message

Re: dumping maps out to XML

2012-08-23 Thread Jim - FooBar();
make sure to bind *read-eval* to false when reading arbitrary code from files... (defn read-back Read the file f back on memory. Careful not to eval anything dangerous (#=). [f] (binding [*read-eval* false] (read-string (slurp f Jim On 23/08/12 21:32, larry google groups wrote: (def m

The Value of Values

2012-08-23 Thread Michael Jaaka
I'm just after watching the Rich's keynote - the value of values. Man this is outstanding! If i only knew that before, my newest information system would be much easier to debug, state of entites were easier to reason and additionally I would had history, even by using current RDBM. You have

Re: Rich's The Value of Values and REST

2012-08-23 Thread Stuart Halloway
Rich was promoting functional programming. I can see functional programming has its benefits, but you will need mutable states eventually somewhere to do useful things. Functional programming just tell you to constraint yourself when using mutable states. It's not like mutable states are to