Nice pointers,
I'm soo noob in the clojure world that I'm not able to answer your
question, but I will look into your articles.
Cheers,
Johan
Den torsdagen den 8:e november 2012 kl. 19:42:31 UTC+2 skrev Yakovlev Roman:
>
> Some time have passed since i posted
> "Is clojure need it's own web f
Not yet, I'll put this on my agenda. I need some research time not being
familiar yet with how it would translate in ClojureScript and if it's worthwhile
to implement it.
Comments from any one using ClojureScript ?
Luc
> Does Clojurescript have a trace function?
>
> On Sat, Jun 2, 2012 at 5:26
Nvm. Not yet.
I'm reluctant to dive into clojurescript because the debugger and trace
functions aren't ready yet.
I suppose if I make test cases for everything and stick to tiny functions,
I should be alright.
Anyway, if Chris Granger uses it, it's probably pretty good.
HERE GOES!
On Sun, Jun
Does Clojurescript have a trace function?
On Sat, Jun 2, 2012 at 5:26 PM, Softaddicts wrote:
> clojure.tools.trace beats println by far (biased advice, I maintain
> it:)))
> It's also easier to segregate between debug and normal output in the code.
>
> You can enable/disable fn tracing dynami
On Sun, Jun 3, 2012 at 1:55 AM, Vinzent wrote:
> Actually, it's kinda the same (Fogus and me decided to merge trammel and
> clojure-contracts into one library)
Yeah, I figured. I just wanted to point people to the newly created
contrib library since that's where (I assume) future development will
Actually, it's kinda the same (Fogus and me decided to merge trammel and
clojure-contracts into one library)
воскресенье, 3 июня 2012 г., 6:31:50 UTC+6 пользователь Sean Corfield
написал:
>
> On Sat, Jun 2, 2012 at 5:22 PM, Vinzent wrote:
> > BTW, you may want to use clojure-contracts
> > (ht
On Sat, Jun 2, 2012 at 5:22 PM, Vinzent wrote:
> BTW, you may want to use clojure-contracts
> (https://github.com/dnaumov/clojure-contracts) instead of asserts or
> :pre\:post in order to get much nicer and informative error reporting.
Or keep an eye on https://github.com/clojure/core.contracts c
BTW, you may want to use clojure-contracts (
https://github.com/dnaumov/clojure-contracts) instead of asserts or
:pre\:post in order to get much nicer and informative error reporting.
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to thi
clojure.tools.trace beats println by far (biased advice, I maintain it:)))
It's also easier to segregate between debug and normal output in the code.
You can enable/disable fn tracing dynamically from the REPL for all fns in a
given
namespace.
I seldom use a debugger. When I do it's to dive
On Sat, Jun 2, 2012 at 2:34 PM, Moritz Ulrich
wrote:
> I think one important point here is that you use two different data
> structures to hold the same kind of data.
Points and deltas are not the "same kind of data". Yes, they both have
x/y/z values but their meaning is different. Perhaps {:poin
On Fri, Jun 1, 2012 at 8:18 PM, Abraham Egnor wrote:
> Is there some technique I'm not seeing to make this kind of simple
> typo-based error less of a hassle to track down? Or is this simply a matter
> of getting better at deciphering the stack traces?
I think one important point here is that yo
On Fri, Jun 1, 2012 at 11:18 AM, Abraham Egnor wrote:
> I'm early in the process of learning clojure, and am hoping that the
> community has suggestions for a frustration I've run into.
...
> I eventually tracked it down by evaluating each subexpression of line - the
> root bug is that mul should
Thank you, both!
I guessed there would be a neater solution (I wasn't aware of
partition-by)
Pete
--
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 mode
You probably want something like
(defn split-zero [ls]
(filter #(not= (first %) 0) (partition-by zero? ls)))
--
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 me
First of all, you should switch from
((fn [ls wip ans] ...) ls [] nil)
to
(loop [ls ls wip [] ans nil] ...)
Read about it here:
http://clojure.org/special_forms
Using higher-order functions, you could do:
(defn split-zero [coll]
(if (seq coll)
(let [divided (partition-by zero? coll)]
You can use (ns-publics 'your.namespace) to see every public intern mapping
in this namespace.
Islon
--
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 m
Other than downloading clojure and clojure.contrib itself, I'd suggest you
get the "progmraming in clojure" book by Stuart Halloway.
Book in hand, try out the examples in clojure REPL. That's good enough
to get started.
Welcome!
On Sun, Jun 20, 2010 at 3:50 AM, Martin Larsson
wrote:
> Hi!
> I'm
Ok. I'll try to correct that. It was already there when I started
working on that section. My main concern is the part where I describe
the rules for the syntax-quote expansion. Does it seem correct to you?
Thanks so much for helping :)
Rock
On May 29, 5:47 pm, Rich Hickey wrote:
> On May 29,
On May 29, 10:18 am, Rock wrote:
> By the way, here's the link:
>
> http://en.wikibooks.org/w/index.php?title=Learning_Clojure&stable=0#R...
>
> On May 29, 4:14 pm, Rock wrote:
>
> > Hi,
>
> > I've just finished updating the "Reader Macros" section of the Wiki
> > (especially the syntax-quote
By the way, here's the link:
http://en.wikibooks.org/w/index.php?title=Learning_Clojure&stable=0#Reader_Macros
On May 29, 4:14 pm, Rock wrote:
> Hi,
>
> I've just finished updating the "Reader Macros" section of the Wiki
> (especially the syntax-quote part), and I would like to know if it's
> r
By the way, here's the link:
http://en.wikibooks.org/wiki/Learning_Clojure#Reader_Macros
On May 29, 4:14 pm, Rock wrote:
> Hi,
>
> I've just finished updating the "Reader Macros" section of the Wiki
> (especially the syntax-quote part), and I would like to know if it's
> reasonably correct. It'
IMHO, the slowdown comes from allocation:
with
(apply merge-with concat (map (fn [x] {(key-fn x) [x]}) s))
you build a map containing a vector, plus a seq (merge-with calls seq on each
argument) for each item before performing a reduction which calls assoc and
concat.
In seq-to-multimap you o
Thanks Jason.
merge-with seems to be made to support a function like this, I wonder
where is the slowdown coming from? Is apply slow?
I named your version seq-to-multimap2. The timing results are below:
user> (def a (reverse (take 10 (iterate (fn [x] (rand-int 100))
1
#'user
Thanks Christophe,
> Using a default return value, you can rewrite the (if-let...) as (conj
> (amap key ()) item).
A good point, getting clojure and clojure :)
(defn seq-to-multimap
"takes a sequence s of possibly repeating elements
and converts it to a map, where keys are obtained
by app
(defn seq-to-multimap
"takes a sequence s of possibly repeating elements
and converts it to a map, where keys are obtained by applying key-
fn
to elements of s and values are sequence of all elements of s with
the particular key"
[s key-fn]
(apply merge-with concat
(map (fn [x]
Hi,
Am 28.04.2009 um 23:28 schrieb Boris Mizhen:
BTW, I hope I'm not abusing this mailing list by asking questions like
this?
This list and the #clojure channel are the right place to ask
such questions. That said, there is the search facility of google
groups and the log of the channel at ht
Hi Boris,
Boris Mizhen a écrit :
> I am starting to learn clojure. I would appreciate comments on the
> utility function below.
> Coding style, idiomatic Clojure, comment style, efficiency, naming
> conventions, indentations (used slime) ... anything I should
> improve :)
>
> (defn seq-to-multima
Thanks Stuart,
preserving order is a nice touch :)
I also did not realize that conj preserves sequence type ...
BTW, I hope I'm not abusing this mailing list by asking questions like
this?
Boris
On Apr 28, 5:15 pm, Stuart Sierra wrote:
> Hi Boris, welcome to Clojure!
>
> This function looks r
Hi Boris, welcome to Clojure!
This function looks reasonable to me. In your example, you don't need
to write "#(identity %)" -- just "identity" is enough. If you want to
preserve the order of objects in the sequence, you can use a vector
instead of a list.
I would use "contains?" in the condit
Thanks Steve and Tim.
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
clojure+unsubscr...@g
Thanks for the detailed explanation Steve!
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
On Jan 28, 2009, at 6:48 PM, Timothy Pratley wrote:
You didn't do anything wrong, there is a definition of + with no
arguments which just returns 0, but no definition of - with no
arguments. Similarly (*) is defined as 1, but (/) is undefined. I
guess there is no such thing as negative 0, then
On Jan 29, 6:03 am, janus wrote:
> While reading Programming Clojure the other night I found this code
> interesting (+), however, when I tried out (-) I got my fingers burnt.
> Why this? Or did I do something wrong which has nothing to do with
> the code in question?
You didn't do anything wro
On 14 Gen, 17:58, Chouser wrote:
> On Wed, Jan 14, 2009 at 6:07 AM, Rock wrote:
>
> [snip]
>
> > #^{:ack bar} foo ; (clojure/with-meta foo {:ack bar})
>
> This is not correct, and a common misunderstanding.
>
> "#^ is not sugar for with-meta. It does not expand into a call to
> with- meta
On Wed, Jan 14, 2009 at 6:07 AM, Rock wrote:
>
[snip]
>
> #^{:ack bar} foo ; (clojure/with-meta foo {:ack bar})
This is not correct, and a common misunderstanding.
"#^ is not sugar for with-meta. It does not expand into a call to
with- meta. They are not equivalent."
http://groups.google.
Here's an update on syntax-quote in the WikiBook (Reader Macro
section):
The most complicated reader macro is syntax-quote, denoted by ` (back-
tick). When used on a symbol, syntax-quote is like quote but the
symbol is resolved to its fully-qualified name:
`meow; (quote cat/meow) ...assuming
On Jan 13, 11:35 am, Rock wrote:
> I've added some info regarding the backquote expansion mechanism in
> the Reader section here:
>
> http://en.wikibooks.org/wiki/Learning_Clojure#The_Reader
>
> I tried to answer the author's question regarding the possible
> expansion order in nested backquote
On Dec 11, 7:06 am, Alex Burka wrote:
> To the debate on whether there should be examples early in the text,
> here are my two cents:
>
> When I click on something called "Learning [programming language]" I
> like to see a representative example of the syntax early on. If
> there's just t
Tim, just go ahead and make any changes you like. If I don't like
them, I can always revert ;) Actually, I'm sure anything you add we
can find a place for, but like I said, that would likely be a separate
example page in most cases.
Thanks, Randall, I mention keywords-as-functions where I talk ab
On Thursday 11 December 2008 07:41, samppi wrote:
> Great article, but I'm not sure this part in the keyword section is
> correct:
>
> "Keywords exist simply because, as you'll see, it's useful to have
> names in code which are symbol-like but not actually symbols.
> Keywords have no concept of be
Great article, but I'm not sure this part in the keyword section is
correct:
"Keywords exist simply because, as you'll see, it's useful to have
names in code which are symbol-like but not actually symbols. Keywords
have no concept of being namespace qualified as they have nothing to
do with names
Timothy,
Your post is a great one indeed , you have developed a template that
anyone could use to introduce Clojure. I would implore to fresh out
thoughts and deepen it for all to enjoy.
Emeka
--~--~-~--~~~---~--~~
You received this message because you are subsc
To the debate on whether there should be examples early in the text,
here are my two cents:
When I click on something called "Learning [programming language]" I
like to see a representative example of the syntax early on. If
there's just text as far as the eye can see (that is, the first
Hi Brian,
> Rich talks about destructuring in the part about "let" on the "special
> forms" page.
Ah indeed, thanks for pointing that out :)
> If you have any examples to add, please add them yourself (it is a wiki
> page).
You've given some really good reasons why I shouldn't mess with it
*
Tim:
Rich talks about destructuring in the part about "let" on the "special
forms" page.
The discussion of functions and basic syntax is deliberately delayed
because of dependencies, e.g. evaluation can't really be understood
without understanding the reader, and explaining the reader involves
t
On Dec 10, 2008, at 9:03 PM, Brian Will wrote:
btw, you'll see a few notes I left in the text in square brackets
where I wasn't sure on some point. If someone could address those
questions, I'd appreciate it.
[hmm, what are the chances of a false positive due to hash
collision? are the odds
Hi Brian,
Looks really good.
> My intro is meant as a
> sequential tour through the essential concepts, not a practical
> tutorial. In particular, my examples are deliberately cursory and
> abstract, and my API coverage is very minimal.
I have some comments which may go beyond your desired scop
Thanks for explaining the origin of "var" and "ref". An important
thing you should do for learners is to explain their origin of odd/
cryptic names because that makes them much easier to remember. For
example, no text on C I've ever read explains the meaning of standard
library function names, lik
On Wed, Dec 10, 2008 at 4:32 PM, Brian Will <[EMAIL PROTECTED]> wrote:
>
> A Java reference type is basically any type allocated on the heap. The
> four Clojure reference types are particular Java reference types. My
> complaint is this is exactly the sort of weirdness that causes
> learners to sc
On Wed, Dec 10, 2008 at 4:32 PM, Brian Will <[EMAIL PROTECTED]> wrote:
>
> A Java reference type is basically any type allocated on the heap. The
> four Clojure reference types are particular Java reference types. My
> complaint is this is exactly the sort of weirdness that causes
> learners to sc
A Java reference type is basically any type allocated on the heap. The
four Clojure reference types are particular Java reference types. My
complaint is this is exactly the sort of weirdness that causes
learners to scratch their heads. Not the biggest issue, sure, but this
sort of thing is nice to
On Wed, Dec 10, 2008 at 2:10 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote:
>
> On Wednesday 10 December 2008 10:27, Brian W wrote:
> > I've created a new Clojure intro at
> > http://en.wikibooks.org/wiki/Learning_Clojure. ...
> >
> > ...
> >
> > Another issue I had is we don't have a good blanke
On Wednesday 10 December 2008 10:27, Brian W wrote:
> I've created a new Clojure intro at
> http://en.wikibooks.org/wiki/Learning_Clojure. ...
>
> ...
>
> Another issue I had is we don't have a good blanket term for Vars,
> Refs, Agents, and Atoms.
Speaking of these, your article mentions and des
On Wed, Dec 10, 2008 at 1:27 PM, Brian W <[EMAIL PROTECTED]> wrote:
>
> Another issue I had is we don't have a good blanket term for Vars,
> Refs, Agents, and Atoms. Rich sometimes calls them "reference types",
> but that term already has a different meaning in Java. I considered
> "meta-reference
For the File / IO things, skip the Java libs - they are pretty low
level. Go with the Jakarta Commons libs:
http://commons.apache.org/io/description.html , as Stuart has
recommended elsewhere.
On Mon, Nov 24, 2008 at 6:48 AM, Stuart Sierra
<[EMAIL PROTECTED]> wrote:
>
> It's useful to know the s
It's useful to know the standard Java libraries, especially for File/
IO stuff. You can pick up nearly all of it from the Sun Java
tutorials:
http://java.sun.com/docs/books/tutorial/
-Stuart Sierra
On Nov 23, 11:34 pm, syamajala <[EMAIL PROTECTED]> wrote:
> How easy is it to pick up clojure wi
As somebody who did only a few hours of Java, but knows object
oriented programming well and had its fair share of fun with Common
Lisp, Scheme and Haskell, Clojure was quite easy to pick up. For all
pure Clojure stuff, I don't think that you need to know anything about
Java. When you work with
57 matches
Mail list logo