On Sep 3, 2:11 am, Lee Hinman matthew.hin...@gmail.com wrote:
working on the API for ClojureDocs.org in the coming future. I was
hoping to get some feedback regarding what people wanted to see for an
API for ClojureDocs:
Any other feedback is highly appreciated :)
when i added examples, i
The literate programming discussion centered around the question
what should be the state of the art in clojure documentation,
not what is the state of the art in clojure documentation.
If you're looking for API documentation then literate programming
is the wrong tool. An API would document
See http://en.wikipedia.org/wiki/Axiom_computer_algebra_system
which is in process to become a fully literate computer
algebra system. 20 volumes so far and a lot of documentation
still to come.
Once a system gets larger than one person's head (e.g. Rich's)
then the question of why becomes
One of the most important things for me is the access to code
examples. Every example could be split in multiple parts. (comment,
function and result part for example)
Editors (Emacs + Slime) could display these in a nicely and decent
manner while developing.
Also, bulk-get could be helpful (to
Is it feasable to create a literate haskell like alternate format for Clojure?
2010/9/6 Tim Daly d...@axiom-developer.org:
See http://en.wikipedia.org/wiki/Axiom_computer_algebra_system
which is in process to become a fully literate computer
algebra system. 20 volumes so far and a lot of
Dear all ,
How to get external clojure libs workng in my system? like
clojure.contrib , etc?
Thanks in advance
AV
--
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
Dear all ,
How to get external clojure libs workng in my system? like
clojure.contrib , etc?
Thanks in advance
AV
--
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
I liked it. Easy to grok.
I had some vague idea that monads are like overloading the pipe operator in
a function pipeline, but now it's much clearer.
I know some abstract algebra, though not category theory.
I skipped the proofs, didn't care about those.
--
Eivind Magnus Hvidevold
Cell: +47
It looks like the matchure http://github.com/dcolthorp/matchure.git does
this kind of thing .. :) .. I guess somebody has already written a library
to do what I wanted ...
On Mon, Sep 6, 2010 at 9:44 AM, Sunil S Nandihalli
sunil.nandiha...@gmail.com wrote:
Hi Mark,
Let us say my dispatch
Hi Mark,
Let us say my dispatch function always returns a vector of 4 keywords. now
I want to write my methods in the following way..
(defmethod foo [_ :hello_ _ ] (str I'm method 1))
(defmethod foo [:world _ :us _ ] (str I'm method 2))
(defmethod foo
Thanks Mark for you reply. Well I realized we can do that .. but I feel it
would be more expressive and readable if I could do the wild-card like
pattern matching when I am defining the method.
Sunil.
On Mon, Sep 6, 2010 at 9:25 AM, Mark Rathwell mark.rathw...@gmail.comwrote:
You can add
Hi,
On 6 Sep., 06:14, Sunil S Nandihalli sunil.nandiha...@gmail.com
wrote:
(defmethod foo [_ :hello _ _ ] (str I'm method 1))
(defmethod foo [:world _ :us _ ] (str I'm method 2))
(defmethod foo [:city _ :us _ ] (str I'm method 3))
Easy to grok is music to my ears.
I imagine most people who read my post would skip the proofs, and that
is just fine. The proofs are gruntwork. I wouldn't want the tedious
details to obscure the idea of the monad, which is quite elegant once
you get your head around it.
On Mon, Sep 6, 2010 at
Hi Abraham,
Make sure that the jar file of the external library you are referring to
is in path. If you are developing clojure code .. I would strongly advice
you to use leiningen which takes care of a lot of these things for you. Btw.
what is the development environment you are using? ..
Try to
thanks Meikel for the suggestion .. I never thought of that .. (or actually
didn't know about it)..
I think that helps..
Sunil.
On Mon, Sep 6, 2010 at 8:19 PM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On 6 Sep., 16:43, Meikel Brandmeyer m...@kotka.de wrote:
(defmulti foo
when I say is in path ... I meant that you CLASSPATH variable has this jar
file in it..
On Mon, Sep 6, 2010 at 8:30 PM, Sunil S Nandihalli
sunil.nandiha...@gmail.com wrote:
Hi Abraham,
Make sure that the jar file of the external library you are referring to
is in path. If you are
Leinengen makes the process pretty painless, see:
http://github.com/technomancy/leiningen
On Sep 6, 5:20 am, Abraham Varghese vincent@gmail.com wrote:
Dear all ,
How to get external clojure libs workng in my system? like
clojure.contrib , etc?
Thanks in advance
AV
--
You received
Dear all,
is there a function to map a function to all values in a map, keeping
the same keys?
Reducing from the seqed map seems a bit slower that what could be done
directly...
Best,
Nicolas.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post
Nicolas
I am not sure of the performance characteristics.. but you may want to look
at
*(clojure.walk/walk #(do (println inner : %) %) #(do (println outer :
%) %) {:a 1 :b 2})
*
Best regards,
Sunil.
On Mon, Sep 6, 2010 at 9:10 PM, Nicolas Oury nicolas.o...@gmail.com wrote:
Dear all,
is
(clojure.walk/walk (fn [[key val]] [key (* 2 val)]) identity {:a 1 :b 2})
On Mon, Sep 6, 2010 at 9:26 PM, Sunil S Nandihalli
sunil.nandiha...@gmail.com wrote:
Nicolas
I am not sure of the performance characteristics.. but you may want to look
at
*(clojure.walk/walk #(do (println inner :
walk is good but it's not lazy. If you want to preserve laziness you can do:
(defn map-vals
transform a map by mapping it's keys to different values.
[f m]
(into {} (map (fn [[key val]] [key (f val)]) m)))
This is also nice because you can then write functions whose arguments
are [val]
On 6 September 2010 18:29, Robert McIntyre r...@mit.edu wrote:
walk is good but it's not lazy. If you want to preserve laziness you can do:
This won't be lazy, because (into {} ...) is a strict operation.
I'd suggest something like
(defn mmap [f m]
(zipmap (keys m) (map f (vals m
f is
I thought that since into uses reduce, it would be lazy, but I was wrong.
reduce just plows through everything with a non-lazy recursion.
Why is reduce not lazy?
--Robert McIntyre
On Mon, Sep 6, 2010 at 12:37 PM, Michał Marczyk
michal.marc...@gmail.com wrote:
On 6 September 2010 18:29, Robert
On Mon, Sep 6, 2010 at 9:49 AM, Robert McIntyre r...@mit.edu wrote:
I thought that since into uses reduce, it would be lazy, but I was wrong.
reduce just plows through everything with a non-lazy recursion.
Why is reduce not lazy?
reduce in clojure == foldl in Haskell
and as far as I know,
reduce returns a single value; there's no collection to make lazy.
There is reductions, which returns the intermediate results of reduce
as a lazy sequence.
Justin
On Sep 6, 12:49 pm, Robert McIntyre r...@mit.edu wrote:
I thought that since into uses reduce, it would be lazy, but I was wrong.
On Mon, Sep 6, 2010 at 10:09 AM, Justin Kramer jkkra...@gmail.com wrote:
reduce returns a single value; there's no collection to make lazy.
There is reductions, which returns the intermediate results of reduce
as a lazy sequence.
if f = cons in 'reduce f a seq', there is a collection. Though
On 6 September 2010 18:49, Robert McIntyre r...@mit.edu wrote:
I thought that since into uses reduce, it would be lazy, but I was wrong.
reduce just plows through everything with a non-lazy recursion.
Well, there's another reason in that the concept of a lazy map is
problematic. In Clojure, at
On Sep 6, 11:40 am, Nicolas Oury nicolas.o...@gmail.com wrote:
is there a function to map a function to all values in a map, keeping
the same keys?
I like reduce because you can modify both the key and the value, and
even choose to omit or add certain keys:
(reduce (fn [[k v] m] (assoc m k
Why is it that clojure maps aren't lazy though?
Wouldn't that be just as useful an abstraction as lazy sequences?
Aren't map really just lists of pairs in the end anyway?
--Robert McIntyre
On Mon, Sep 6, 2010 at 1:19 PM, Michał Marczyk michal.marc...@gmail.com wrote:
On 6 September 2010 18:49,
On Mon, Sep 6, 2010 at 10:47 AM, Robert McIntyre r...@mit.edu wrote:
Why is it that clojure maps aren't lazy though?
Wouldn't that be just as useful an abstraction as lazy sequences?
Aren't map really just lists of pairs in the end anyway?
how can laziness benefit map usage pattern ? efficient
Different reactions:
1. The reduce solution is O(n .log n) + time of mapping elements, as
inserting in a map is O(log n). A tree with n leafs and arity at least
binary is of size at most 2n. So a map on a map could be done
in O(n) + time of mapping elements, but it would need a bit of
support
Hello all, here is an extremely reduced version of a problem I'm not
sure how to work around. (It's going to be a toy assembly language if
anyone's wondering) When I call assemble in the following code I get
the error: java.lang.IllegalStateException: Var reader/*macros* is
unbound. I'd like
Cameron Pulsford wrote:
Is there a way to do this? Besides cleaning up function signatures is
this a premature optimization to begin with?
(declare *macros*)
(defn macro-expand [tokens]
(map #(get *macros* % %) tokens))
(defn compile-op [op]
(macro-expand op))
(defn assemble
Hi Cameron,
Use def or defvar (if you use contrib.def) to create an instance of *macros*.
Declare is used for forward references (when you reference something
before declaring it) so the compiler knows that your code is sane but it does
not define anything by itself.
Yes, it may look a bit
Interesting results.
By putting (println compiled-ops) it worked, but not by putting it in
a doall. (same error)
Changing my declares to defs did the trick did though and learning
about bound-fn* was also a serious mind-expander for me right now too.
Thanks to both of you!
On Sep 6, 4:57 pm,
I am a bit puzzled, I did a quick test and rebinding using a declare
should work (outside of your sample code). I have a reminiscence of a
similar problem I encountered before version 1.0 and used a def to solve my
problem at the time.
But the small test I just made with 1.2 is working.
There's
On Mon, Sep 6, 2010 at 2:51 AM, Tim Daly d...@axiom-developer.org wrote:
The literate programming discussion centered around the question
what should be the state of the art in clojure documentation,
not what is the state of the art in clojure documentation.
I brought up literate programming
I was wondering if anyone has used clojure for image/video processing
and how that has worked out.
I've spent a long time on this since clojure 1.0 and have gone through
many different (java) libraries trying to find something that's truly
awesome.
I've tried:
Images:
ImageJ (lots of plugins
If by processing image you mean like resizing, etc. I use jmagick
http://www.jmagick.org/index.html
On Sep 6, 2010, at 5:57 PM, Robert McIntyre r...@mit.edu wrote:
I was wondering if anyone has used clojure for image/video processing
and how that has worked out.
--
You received this message
Hello,
I've got a concurrency problem and it's not really clear to me how to
solve it. I have a Swing GUI doing a search in background with agents
and the results are displayed one after the other, also in background.
Here is, largely simplified, how I do it:
(defvar- *end-search* (atom false))
It would be _nice_ to have a default that was the baseline format. The Canon of
Clojure Conventional Conformity ().
If an org or project wanted to have a different format, they could supply it as
a plugin to the clojure-fmt tool.
(set-format local-conventions)
When the format gets
On Sep 6, 2010, at 2:57 PM, Robert McIntyre wrote:
I was wondering if anyone has used clojure for image/video processing
and how that has worked out.
Images:
For image processing, I've just been using the java2d api, a la
http://www.javaworld.com/javaworld/jw-09-1998/jw-09-media.html?page=1
Disclamer: I'm a Clojure noob, so bad code follows...
I have been putzing around with implementing a Simple Temporal Network
(a graph structure for scheduling problems) in Clojure. In the
process, I wanted to generate records that had default values.
I ran into this blog post by cemerick
On Mon, Sep 6, 2010 at 5:45 PM, Sean Grove otokora...@gmail.com wrote:
On Sep 6, 2010, at 2:57 PM, Robert McIntyre wrote:
I was wondering if anyone has used clojure for image/video processing
and how that has worked out.
We've been rolling our own, either using Apple's Core Image framework
I figure enough time has passed that I want to bring this up again.
For JSON, are you using clojure.contrib.json or clj-json? Why?
Thanks
--
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
We use org.danlarkin.json, and it's never let us down.
-Phil
On Sep 6, 2010 7:50 PM, Wilson MacGyver wmacgy...@gmail.com wrote:
I figure enough time has passed that I want to bring this up again.
For JSON, are you using clojure.contrib.json or clj-json? Why?
Thanks
--
You received this
Mark-
ATM, autodoc is your best bet for automatically generating
documentation from your source files.
The ClojureDocs lib analyzer codebase is pretty much a ns / var
metadata extraction tool, similar to autodoc. Unfortunately out of
the five requirements you listed [1] we only (automatically)
Hi,
On 7 Sep., 04:50, Wilson MacGyver wmacgy...@gmail.com wrote:
For JSON, are you using clojure.contrib.json or clj-json? Why?
I use clj-json. Mainly because it is brought in by another dependency,
anyway. There were some comparisons, which claimed it to be quite
fast. But you know me: I'm an
Thank you everyone for your time and great advice.
Thank you Wilson MacGyver, for recommending jmagick. I actually
already use it's brother im4java (http://im4java.sourceforge.net/) for
great justice already and forgot to mention it. It does alright for
basic image manipulation.
The reason
An interesting candidate for this is the current
clojure.contrib.pprint tool. It should be adapted to not only grok
clojure forms, but also strings, of course (and this may not be that
easy), so that nothing in the source code is lost during the parsing
...
2010/9/6 sitk...@gmail.com:
It would
50 matches
Mail list logo