Re: Lack in the documentation

2012-02-15 Thread Sean Corfield
I don't think your tone is very helpful Armando. It's perfectly reasonable to ask for specific examples - so that there are actionable tasks we as a group can take on, rather than just some vague "the documentation is too Java-centric" complaint. When I read the OP, I was not sure what he was real

Re: Lack in the documentation

2012-02-15 Thread Armando Blancas
> Can you provide some more specific examples of what's missing? Surely you're joking, Mr. Hagelberg. > I don't know any Java and was able to manage pretty well. This is no time for modesty, lest the OP might feel his troubles aren't even valid. Perhaps better to say that a rudimentary grasp of

add-watch in clojurescript: awesome, or not awesome?

2012-02-15 Thread kovas boguta
More than a few people have noticed the similarities between add-watch, and event/data binding in things like Backbone.js. Maybe its worth considering if a feature marked as "alpha" is really the best thing for this case. 1. add-watch arguments are verbose. Do we really need a key to name the wat

Re: Looking for parser generator library

2012-02-15 Thread Alan Malloy
Roman Gonzalez: > this library is a port of Haskell's attoparsec Despite: > > Haskell has a parser library named for a distance of approximately > > three centimetres? :) > > Not that it's pertinent, but a parsec is 31 trillion kilometers.  Did > you massively misplace a decimal?  :) 1 attoParsec

Re: Looking for parser generator library

2012-02-15 Thread Despite
> Haskell has a parser library named for a distance of approximately > three centimetres? :) Not that it's pertinent, but a parsec is 31 trillion kilometers. Did you massively misplace a decimal? :) -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: ClojureScript def, vars, and binding

2012-02-15 Thread Cedric Greevey
On Wed, Feb 15, 2012 at 5:08 PM, David Nolen wrote: > On Wed, Feb 15, 2012 at 2:09 PM, Brandon Bloom wrote: >> >> ClojureScript doesn't have future-call or agents yet, but if they (or >> similar constructs) are to be implemented correctly, you need the ability to >> save and load a binding frame.

Re: Lack in the documentation

2012-02-15 Thread sean neilan
The documentation definitely exists. A lot of people have written a lot about clojure. The time consuming part is sorting and making sense of it. Sent from my iPhone On Feb 15, 2012, at 3:48 PM, Phil Hagelberg wrote: > g1i1ch writes: > >> Thanks for the reply, I mostly want to get out of the w

Re: Lack in the documentation

2012-02-15 Thread sean neilan
Also, since the language is recent and has changed so rapidly, a lot of documentation has become out of date but still exists. That has to be sorted out too. Sent from my iPhone On Feb 15, 2012, at 3:48 PM, Phil Hagelberg wrote: > g1i1ch writes: > >> Thanks for the reply, I mostly want to get

Re: ClojureScript def, vars, and binding

2012-02-15 Thread David Nolen
On Wed, Feb 15, 2012 at 2:09 PM, Brandon Bloom wrote: > ClojureScript doesn't have future-call or agents yet, but if they (or > similar constructs) are to be implemented correctly, you need the ability > to save and load a binding frame. That's what my changes accomplish. > Given the single-thre

Re: Lack in the documentation

2012-02-15 Thread Phil Hagelberg
g1i1ch writes: > Thanks for the reply, I mostly want to get out of the way my main > reason for writing the shout out. I think the language is a nod to the > future of lisp and possibly one of the greatest lisps around with > wondrous support. I want the language to succeed. Because of that I > w

Re: Clojure 1.3.0 updated cheatsheet, and one with links to clojuredocs.org

2012-02-15 Thread Phil Hagelberg
Andy Fingerhut writes: > Fogus, Alex Millier, and I have made some updates to the Clojure > cheatsheet for Clojure 1.3.0: > > http://clojure.org/cheatsheet Looks good. I did notice the copyright date in the footer is wrong though. -Phil -- You received this message because you are subscribed

Re: Lack in the documentation

2012-02-15 Thread sean neilan
You actually do need to know a thing or two about programming in Java. There's so many useful Java libraries that get real work done when you need it done. I'm a Java programmer so I haven't had this problem. If I didn't know Java, learning clojure would've been twice as hard. It took me 3 months

Re: ClojureScript def, vars, and binding

2012-02-15 Thread Brandon Bloom
> One problem then is that the work becomes explicit instead of implicit as it is in Clojure: future and agent sends setup the machinery for you. You need the ability to explicitly capture and restore the current thread bindings to implement that implicit machinery. The future macro is implemen

Re: Lack in the documentation

2012-02-15 Thread g1i1ch
Thanks for the reply, I mostly want to get out of the way my main reason for writing the shout out. I think the language is a nod to the future of lisp and possibly one of the greatest lisps around with wondrous support. I want the language to succeed. Because of that I wanted to point to the issue

Re: Clojure 1.3.0 updated cheatsheet, and one with links to clojuredocs.org

2012-02-15 Thread sean neilan
Agreed. Thank you! Sent from my iPhone On Feb 15, 2012, at 1:54 PM, Manuel Paccagnella wrote: > On 02/15/2012 08:21 PM, Andy Fingerhut wrote: >> Fogus, Alex Millier, and I have made some updates to the Clojure cheatsheet >> for Clojure 1.3.0: >> >> http://clojure.org/cheatsheet >> >> The links

Re: Persistent Data Structure and Persistent Types

2012-02-15 Thread Ido Ran
Thank you very much, you help me 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 first post. To unsubscr

Re: Clojure 1.3.0 updated cheatsheet, and one with links to clojuredocs.org

2012-02-15 Thread Sean Corfield
Very nice! Thank you for working on that! Also, thank you for the stream of updates to the Where Did Clojure Contrib Go? page recently - very much appreciated! Sean On Wed, Feb 15, 2012 at 11:21 AM, Andy Fingerhut wrote: > Fogus, Alex Millier, and I have made some updates to the Clojure cheatsh

ANN: ClojureScript Cheatsheet

2012-02-15 Thread Fogus
I've created a ClojureScript cheatsheet. It's a high-level overview and not meant to cover every capability. The repo is at: https://github.com/fogus/clojure-cheatsheets The PDF is at: https://github.com/fogus/clojure-cheatsheets/blob/master/pdf/cljs-cheatsheet.pdf?raw=true Feedback and nice

ANN: ring-clj-params

2012-02-15 Thread Fogus
# What is it? A Ring middleware that augments :params according to a parsed Clojure data literal request body. # Where is it? https://github.com/fogus/ring-clj-params # Leiningen Usage In your :dependencies section add the following:

Re: Clojure 1.3.0 updated cheatsheet, and one with links to clojuredocs.org

2012-02-15 Thread Manuel Paccagnella
On 02/15/2012 08:21 PM, Andy Fingerhut wrote: Fogus, Alex Millier, and I have made some updates to the Clojure cheatsheet for Clojure 1.3.0: http://clojure.org/cheatsheet The links there go to the generated documentation on clojure.github.com. Below is a version that is the same as the one a

Clojure 1.3.0 updated cheatsheet, and one with links to clojuredocs.org

2012-02-15 Thread Andy Fingerhut
Fogus, Alex Millier, and I have made some updates to the Clojure cheatsheet for Clojure 1.3.0: http://clojure.org/cheatsheet The links there go to the generated documentation on clojure.github.com. Below is a version that is the same as the one above, except that its links go to the appropria

Re: Hierarchical logs

2012-02-15 Thread jweiss
Unfortunately it doesn't call the functions/macros that the pprint code says are meant for custom dispatch: pprint-logical-block pprint-newline pprint-indent etc Wish I could find an example of those being used in a custom dispatch, I made a lame attempt and for some reason my custom dispatch pri

Re: ClojureScript assoc performance

2012-02-15 Thread Takahiro
Timothy It seems that HashMap also clones whole. https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L2371 David I see. I guessed that overhead of persistent data structure might be considered. Thanks. 2012/2/16 Timothy Baldridge : >>Is this design choice intended for so

Re: ClojureScript assoc performance

2012-02-15 Thread David Nolen
It is intended, copy-on-write. No one has yet attempted persistent data structures for ClojureScript. Until then I think transient versions of the current data structures might be useful if someone is willing to contribute them. David On Wed, Feb 15, 2012 at 1:24 PM, Takahiro Hozumi wrote: > Hi

Re: ClojureScript assoc performance

2012-02-15 Thread Timothy Baldridge
>Is this design choice intended for some reason? Maybe you should try using a Hashmap? https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L2322 -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful term

ClojureScript assoc performance

2012-02-15 Thread Takahiro Hozumi
Hi, I found that assoc can be slow in ClojureScript. This is my app profile. http://twitpic.com/8kbupv/full I think the cause is that entire clone happen when assoc is called. https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L2284 Is this design choice intended for som

Re: .class files constantly going stale?

2012-02-15 Thread Chas Emerick
The :import will work as well, as long as the :require comes first. - Chas On Feb 15, 2012, at 12:17 PM, Jay Fields wrote: > interesting, the trick is to use foo.recs.ARecord... > > (extend-protocol AProto > foo.recs.ARecord > (handle [o] > ;; do stuff > )) > > Thanks for that. > > O

Re: .class files constantly going stale?

2012-02-15 Thread Jay Fields
interesting, the trick is to use foo.recs.ARecord... (extend-protocol AProto   foo.recs.ARecord   (handle [o]     ;; do stuff )) Thanks for that. On Wed, Feb 15, 2012 at 11:31 AM, Chas Emerick wrote: > No; just add a (:require foo.recs) to the ns form of foo.prots, so the > defrecord form(s)

Re: Lack in the documentation

2012-02-15 Thread David Nolen
Java is not a barrier of entry for Clojure for most folks - it is in fact one of the major reasons for Clojure's success. If you're mostly interesting in GUIs and games - some people have taken the time to provide Clojure-y libraries for just that. - Games, https://github.com/ztellman/penumbra - G

Re: .class files constantly going stale?

2012-02-15 Thread Chas Emerick
No; just add a (:require foo.recs) to the ns form of foo.prots, so the defrecord form(s) can be loaded; this will generate the classes at runtime, and avoid any ahead-of-time compilation. In general, AOT is rarely necessary, and almost always a hinderance. - Chas On Feb 15, 2012, at 11:13 AM,

Re: ClojureScript def, vars, and binding

2012-02-15 Thread David Nolen
On Tue, Feb 14, 2012 at 7:17 PM, Brandon Bloom wrote: > > I put your notes here, > > http://dev.clojure.org/**display/design/Dynamic+Binding > > Thanks! > > I don't do anything special for asynchronous code, this simply provides the > primiti

Re: Lack in the documentation

2012-02-15 Thread Stuart Sierra
Hi, While you don't need to know all about Java the language to use Clojure, you DO need to learn about the standard Java APIs for things like I/O, networking, GUIs, etc. Clojure doesn't try to hide those features of the host platform (whether in Java, C#, or JavaScript). There are great tutor

Re: Persistent Data Structure and Persistent Types

2012-02-15 Thread Timothy Baldridge
>>Let's also say you receive update to specific point every few milliseconds, >>so each update will create a new point and will set the point inside the >>persistent vector and the new vector will now be stored inside a member >>variable? Correct. In my situation, I imported the entire Clojure-

Re: .class files constantly going stale?

2012-02-15 Thread Jay Fields
again, I haven't felt much pain, so I'm not sure what I'm saying is entirely true, but... In the scenario I describe I have to :import the class created by defrecord to reference it as part of extend-protocol For example in foo/recs.clj (ns foo.recs) (defrecord ARecord [a b]) in foo/prots.cl

Re: ClojureScript def, vars, and binding

2012-02-15 Thread Brandon Bloom
> I put your notes here, > http://dev.clojure.org/display/design/Dynamic+Binding Thanks! > How are you ensuring that the binding frames are local to a particular > asynchronous block of code and that they are removed when that asynchronous > block of code exits? I don't do anything special for

Re: ClojureScript def, vars, and binding

2012-02-15 Thread Brandon Bloom
As I experiment with this more, I could see non-dynamic Var objects also being useful once IWatchable is implemented on them. Basically, I'd love to send a defn form to the browser during development and have my UI data-bound to both the data AND *the function that rendered it* :-) My dream is

Lack in the documentation

2012-02-15 Thread g1i1ch
I just wanted to put a shout out to the major clojure guys out there. I've tried several times to learn the language, but I can't get passed the normal lispy stuff to a serious program. Like a game or GUI app. The reason why is because of something I quickly realized. It seems that to fully learn c

Re: .class files constantly going stale?

2012-02-15 Thread Stuart Halloway
> I think this issue is related to using > defrecord > or > defrecord & defprotocol > or > defrecord, defprotocol, & extend-protocol > > I've never bothered to look into the simplest case at which it fails. I have > a namespace that has my defrecord, and another namespace that defines the > prot

Re: Persistent Data Structure and Persistent Types

2012-02-15 Thread Ido Ran
Hi, Thank you for the answer. I agree it does not fell right and I have to be super careful not to modify anything. It will be helpful if you can elaborate on how you use those immutable classes inside immutable collections. In the example you show you had immutable point, if you now keep an equ

ZenRobotics is hiring Clojure developers

2012-02-15 Thread Sean Murphy
Hi all, For anyone who might be interested, ZenRobotics (based in Helsinki, Finland) is looking for Clojure programmers. More details here: http://functionaljobs.com/jobs/90-ai-programmer-clojure-at-zenrobotics-ltd Cheers, Sean -- You received this message because you are subscribed to the

Re: Problem with the Chas Emerick: "Modeling the world ..." video

2012-02-15 Thread László Török
+1 Timothy Washington 2012. február 15., szerda napon a következőt írta: > Yes, I'm seeing the same behaviour. The video cuts off at about 13:44. I'm > very interested in Bayesian networks and especially how to approach it with > Clojure. > > > Thanks > > Tim Washington > Interruptsoftware.ca > 4

Re: Released: nREPL 0.2.0-beta1

2012-02-15 Thread Chas Emerick
You can absolutely run an nREPL server from a mostly-Java application. Something like this would do (just a sketch, untested): private static IFn startServer, stopServer; static { try { RT.var("clojure.core", "require").invoke(Symbol.intern("clojure.tools.nrepl.server")); startS

Re: .class files constantly going stale?

2012-02-15 Thread Jay Fields
I think this issue is related to using defrecord or defrecord & defprotocol or defrecord, defprotocol, & extend-protocol I've never bothered to look into the simplest case at which it fails. I have a namespace that has my defrecord, and another namespace that defines the protocol and uses extend

Re: what stack traces include / exclude regarding monads

2012-02-15 Thread jim
A domonad expression always boils down to a series of m-bind and m- result calls. That's its definition. You can check out my explanation of that here: http://www.clojure.net/2012/02/08/Doing-things/ As such, the stack traces become less helpful. I mostly rely on thinking about my monad expressio

Re: .class files constantly going stale?

2012-02-15 Thread David Nolen
I've never have this problem. I'm assuming you're using AOT? David On Sat, Feb 11, 2012 at 11:34 AM, Andrew Cholakian wrote: > I've noticed that when writing clojure code I constantly need to 'rm -rf > classes' in my project, otherwise anything related to (defrecord) or > (defprotocol) doesn't u

Re: .class files constantly going stale?

2012-02-15 Thread Timothy Washington
I'm noticing a similar problem in my environment. I have (a linux ubuntu server): $ uname -a Linux ubuntu 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux $ lein version Leiningen 1.6.2 on Java 1.6.0_21 Java HotSpot(TM) Client VM It's not a huge problem. But I do fin

Re: Problem with the Chas Emerick: "Modeling the world ..." video

2012-02-15 Thread Timothy Washington
Yes, I'm seeing the same behaviour. The video cuts off at about 13:44. I'm very interested in Bayesian networks and especially how to approach it with Clojure. Thanks Tim Washington Interruptsoftware.ca 416.843.9060 On Tue, Feb 14, 2012 at 3:44 PM, Julio wrote: > Hi, > > Saw that the video

Re: Released: nREPL 0.2.0-beta1

2012-02-15 Thread Stathis Sideris
It sounds great Chas, especially the wide acceptance that nREPL seems to already have with the various tools. I wanted to ask about the potential of this as an embedded Clojure REPL in existing Java applications for the purpose of connecting remotely and performing inspection (and possibly manipul

Re: Hierarchical logs

2012-02-15 Thread Kevin Downey
https://gist.github.com/1314616 is a small example of a custom dispatch, doesn't do custom indenting though On Tue, Feb 14, 2012 at 6:33 PM, jweiss wrote: > It occurred to me that ultimately what I want is just a pretty-printed > output that I can put on a webpage and apply syntaxhighlighter to.