[ClojureScript] Wrapping all def into a load event handler

2011-12-26 Thread Takahiro Hozumi
Hi, In order to manipulate dom, I often want to bind elements into variable through def, but we cannot manipulate it until load event. So I wrapped all def into a load event handler in the following way. https://gist.github.com/1521051 I don't use let, because many elements cause deep nested let, a

Lithub and Marginalia

2011-12-26 Thread nchurch
> Like this? http://brighterplanet.github.com/flight/impact_model.html > You can see how they handle it (from a Ruby-centric perspective) here: > https://github.com/brighterplanet/numbers/blob/gh-pages/_posts/2010-12-02-github-pages-rocco-and-rake-file-tasks.markdown (The original thread seems

Re: Lithub and Marginalia

2011-12-26 Thread nchurch
There is really one more Lithub concern (at least), and that is how to structure entry points into a huge codebase like Clojurehow to present simplifications and toy examples, etc., and walk the reader through it. I think the other two things are such big wins, though, that this third concern

Codox: an API doc generator for Clojure

2011-12-26 Thread James Reeves
Hi folks, In order to generate the documentation for Ring and Compojure, I created Codox after being unable to get Autodoc working. Codox is pretty simple, but should work out of the box, and hopefully looks quite nice. Here are a couple of examples: http://mmcgrana.github.com/ring/ http://weave

Re: Codox: an API doc generator for Clojure

2011-12-26 Thread Shantanu Kumar
+1 This is pretty neat! (I too couldn't get Autodoc working in the past several months.) Regards, Shantanu On Dec 26, 10:29 pm, James Reeves wrote: > Hi folks, > > In order to generate the documentation for Ring and Compojure, I > created Codox after being unable to get Autodoc working. > > Codo

Re: Codox: an API doc generator for Clojure

2011-12-26 Thread Gert Verhoog
I love it, thanks, and I got it running in about 10 seconds: lein install plugin codox 0.3.1 lein doc Question: One of my ns docstrings is a fair amount of text which is rendered as a really long line (because codox puts it inside a ... element). How would you deal with longer documentation str

Running clojure.test.generative specs using lein test

2011-12-26 Thread Román González
Hey guys, Just wondering, is there any way to integrate clojure.test.generative specs with leiningen's "lein test" command? I googled but the documentation of test.generative is pretty scarse. How should I run specs? Thanks in advance. Roman.- -- You received this message because you are subsc

Re: Alternative structures to arrays?

2011-12-26 Thread Philip Potter
On Dec 22, 2011 3:35 PM, "Tassilo Horn" wrote: > > Brian Hurt writes: > > Hi Brian, > > > Vectors are actually a great trade-off, giving you almost the same > > access and memory costs arrays do, but with all the advantages of > > being immutable (multi-threaded goodness). > > On the other hand,

ANN: okasaki-clojure

2011-12-26 Thread JuanManuel Gimeno Illa
Hi all, I've been working a "proof of concept" implementation of some data structures from Okasaki's book "Purely functional data structures". The implementations tries to follow the ML implementation describes in the book so I have defined some macros than use clojure.match to allow patter

unchecked-int returning long?

2011-12-26 Thread Joel Hobson
Hi everyone, I've noticed some unexpected behaviour with the unchecked-int function - I think it's a bug, but I'm not entirely sure I've correctly understood the purpose of the function. (type (unchecked-int 0x)) shows long instead of int. This isn't what I would have expected, either fro

Response to Being a Coder and 10 000 hours.

2011-12-26 Thread algo-lord
Check out The Dunning Kruger Effect to really see people have incorrect opinions of themselves -- 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

Re: Literate programming

2011-12-26 Thread Jay Edwards
Like this? http://brighterplanet.github.com/flight/impact_model.html You can see how they handle it (from a Ruby-centric perspective) here: https://github.com/brighterplanet/numbers/blob/gh-pages/_posts/2010-12-02-github-pages-rocco-and-rake-file-tasks.markdown The same approach should work fin

Strange eval behavior on user-defined macros

2011-12-26 Thread Chris McBride
I'm working on a project where I want to use clojure macros in part of my config file that I eval at runtime. However, I'm getting an "Unable to resolve symbol" exception. So I made a test case to reproduce it below: (ns test.core (:gen-class)) (defmacro make-list [& body] `(list ~@body)) (d

Clojure list syntax sugar: f(x) notation

2011-12-26 Thread Louis Yu Lu
Recently, I found freedom of coding playing with Clojure with over 20 years’ experience on other program languages, Previously, I had several trials of learning Lisp, but never got traction. However there are two syntax notations always bother me, it feels unnatural with my experience on other pro

Clojure list syntax sugar: f(x) notation

2011-12-26 Thread Louis Yu Lu
Recently, I found freedom of coding playing with Clojure with over 20 years’ experience on other program languages, Previously, I had several trials of learning Lisp, but never got traction. However there are two syntax notations always bother me, it feels unnatural with my experience on other pro

Interested in a port of Ruby's String#unpack

2011-12-26 Thread mrb_bk
Hey Everyone: I'm working on a project in Clojure that involves parsing binary data files. Specifically, I'm building a tool for analyzing Redis (http:// redis.io) dump files (.rdb format). The very beginnings of this nascent project are here: http://github.com/mrb/pianist . I am a beginner to

Re: Codox: an API doc generator for Clojure

2011-12-26 Thread Meikel Brandmeyer
Hi, Am 26.12.2011 um 22:23 schrieb Gert Verhoog: > Question: One of my ns docstrings is a fair amount of text which is rendered > as a really long line (because codox puts it inside a ... > element). How would you deal with longer documentation strings? Would I need > to insert manual line bre

Re: Strange eval behavior on user-defined macros

2011-12-26 Thread Meikel Brandmeyer
Hi, eval happens with *ns* bound to clojure-core. Try to fully qualify make-list. Sincerely Meikel PS: In case you are Chris on SO, I answered your question there also. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

Re: Clojure list syntax sugar: f(x) notation

2011-12-26 Thread Softaddicts
Hi, I have more than 30 years of dev under my belt dated back to Fortran, Cobol,... never had a problem with Lisp syntax Far more bothering to me were immutability and laziness, it took me three months to get used to it, not in a home project but laying out production code. Clojure is a Li

Re: Interested in a port of Ruby's String#unpack

2011-12-26 Thread mrb_bk
I also thought I would mention that I've been hanging out in #clojure as mrb_bk - please hit me up if you would like to chat about this. On Dec 26, 10:08 am, mrb_bk wrote: > Hey Everyone: > > I'm working on a project in Clojure that involves parsing binary data > files.  Specifically, I'm buildin

Re: Interested in a port of Ruby's String#unpack

2011-12-26 Thread Geoff Salmon
Hi, does the unpack function in this library do what you're looking for? https://github.com/geoffsalmon/bytebuffer It unpacks values from Java's ByteBuffer objects instead of strings, which seemed more appropriate in Java-land. I haven't touched the code since Clojure 1.2, but if it looks useful I

Bug in extend-protocol macro? (Clojure 1.3.0)

2011-12-26 Thread Peter Taoussanis
Hi there, I'm using Clojure 1.3.0 and am running into what seems like an edge- case problem with extend-protocol (?)... Given (defprotocol MyProtocol (action [x])), (extend-protocol MyProtocol (Class/forName "[B") (action [x] "ByteArray") java.lang.Integer (action [x] "Integer")) expands to

Re: Bug in extend-protocol macro? (Clojure 1.3.0)

2011-12-26 Thread Alan Malloy
On Dec 26, 10:21 pm, Peter Taoussanis wrote: > Hi there, > > I'm using Clojure 1.3.0 and am running into what seems like an edge- > case problem with extend-protocol (?)... > > Given (defprotocol MyProtocol (action [x])), > > (extend-protocol MyProtocol >   (Class/forName "[B") (action [x] "ByteAr