You aswers had everything I needed to know to move forward. Did not notice
anything strange in them. It were late hours here in Moscow thought :-)
On Sunday, December 2, 2012 2:32:45 AM UTC+4, lpetit wrote:
>
> 2012/12/1 Laurent PETIT >:
> > Hello,
> >
> > 2012/12/1 Vladimir Tsichevski >:
> >
Hi All,
I just open sourced a new Clojure library vectorz-clj with support for high
performance vector maths in Clojure. It's fairly general purpose, and
designed for use in 3D games, simulations and machine learning
applications. I'm using it for my own machine learning apps and it is
working
I'm mapping a function that throws an exception over a collection:
=> (def mapped (map (fn [_] (throw (Exception.))) [1 2 3]))
#'user/mapped
'map' is lazy so we're not expecting to see the exception until we're
trying to access the result:
=> mapped
Exception user/fn--709 (NO_SOURCE_FILE:1)
A
Hi
user=> (def primes
> (cons 2
> (filter
> (fn isprime[n]
>
> (every?
> #(pos? (mod n %))
> (take-while #(<=(* % %)n) primes)))
> (iterate inc 3
> user=> (take 50 primes)
> (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
All,
I have a request which I hope the members of this group are uniquely positioned
to help with. I have recently started working on a new book for The Pragmatic
Programmers with the working title "Seven Concurrency Models in Seven Weeks"
(it follows on from their existing "Seven Languages" an
On Sat, Dec 1, 2012 at 12:24 AM, Jonas wrote:
>
> * Predicates on logic vars:
> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>
This is now possible since we have constraints.
> * Segment vars:
> [(* ??x 1 ??y) (* ??x ??y)] => (* 4 3 2 1 2 3 4) would turn into (*
I remember seeing it somewhere recently but I can't find it now...
As you probably know, if you quasiquote in clojure it automatically adds
namespaces:
> `[foo ~1]
[mylibrary.core/foo 1]
The library I am looking for lets you write:
> (template [foo ~1])
[foo 1]
Thanks for your help!
--
You
Never mind, I just found it on clojars. It is:
https://github.com/brandonbloom/backtick
On Sunday, December 2, 2012 12:24:29 PM UTC-6, Conrad wrote:
>
> I remember seeing it somewhere recently but I can't find it now...
>
> As you probably know, if you quasiquote in clojure it automatically adds
On Sunday, December 2, 2012 7:33:17 PM UTC+2, David Nolen wrote:
>
> On Sat, Dec 1, 2012 at 12:24 AM, Jonas >wrote:
>
>>
>> * Predicates on logic vars:
>> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>>
>
> This is now possible since we have constraints.
>
Awesome. I
Hi,
I'm trying to write an xmpp, which after receiving a message, pushes the
messages with a websocket using async-push. I can't figure out how to do
this because both xmpp and async-push use event handlers -- how do I chain
them together. This code doesn't work, but I guess you get the idea of
Hi Guys,
We seem to have not-any? but not an any? function,
I know we have some but it is not a predicate and I found myself
defining some? above today.
Why not have some? or any? in the core?
Cheers,
Tom
--
You received this message because you are subscribed to the Google
Groups "Clojure" gro
Hi,
I just published the 9th tutorial of the series modern-cljs.
It talks about testing. It uses the CLJS proposed patch as a true sample case
to work on.
HIH
My best
Mimmo
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
Its perfectly fine to use some as a predicate as far as I know...works
excellent with if-let/when-let - what is the problem?
Jim
On 02/12/12 19:47, Tom Hall wrote:
Hi Guys,
We seem to have not-any? but not an any? function,
I know we have some but it is not a predicate and I found myself
def
(I couldn't figure out where to put this so I might as well just post it
here)
The page says
> Syntax-quote (`
where it should say
> Syntax-quote `(
Otto
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo
On Sun, Dec 2, 2012 at 12:48 PM, Jim - FooBar(); wrote:
> Its perfectly fine to use some as a predicate as far as I know...works
> excellent with if-let/when-let - what is the problem?
There might be cases in which it matters whether something returns nil
(as 'some' does) or false (as 'some?' wou
2012/12/3 Mimmo Cosenza
> I just published the 9th tutorial of the series modern-cljs.
>
> It talks about testing. It uses the CLJS proposed patch as a true sample
> case to work on.
> HIH
>
The link:
https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-09.md
Thank you!
--
MK
ht
Sure - added instructions and uploaded version 0.0.1 to Clojars.
Hopefully that works smoothly, any issues let me know.
On Sunday, 2 December 2012 13:56:07 UTC, Michael Klishin wrote:
>
> 2012/12/2 Mikera >
>
>> The Clojure library is here: https://github.com/mikera/vectorz-clj
>>
>
> Please add
ops. thanks
mimmo
On Dec 2, 2012, at 10:15 PM, Michael Klishin
wrote:
> 2012/12/3 Mimmo Cosenza
> I just published the 9th tutorial of the series modern-cljs.
>
> It talks about testing. It uses the CLJS proposed patch as a true sample
> case to work on.
> HIH
>
> The link:
> https://gith
The full sentence is this:
Syntax-quote (`, note, the "backquote" character), Unquote (~) and
Unquote-splicing (~@)
It looks like perhaps someone started writing this:
Syntax-quote (`), Unquote (~) and Unquote-splicing (~@)
and then added some more explanatory text inside the parenthes
Hey Laurent,
For what it's worth, I was a little surprised that CCW used it's own
output folder rather than Eclipse's, but I understand why you'd do it
that way.
One thing that was a little problematic was that CCW automatically
created the folder and added it to the Eclipse classpath when all I
I just published a new 0.2.0-SNAPSHOT that includes a fix parallel to Rich
Hickey's change to handling of records in Clojure 1.5.
On Sunday, December 2, 2012 10:27:46 AM UTC-8, Conrad wrote:
>
> Never mind, I just found it on clojars. It is:
> https://github.com/brandonbloom/backtick
>
> On Sund
I am playing with clojurescript, and I have this code:
(defn prepare [number]
(def targets (take 4 (drop (* 4 (- number 1)) (dom/getElementsByClass
"place-div"
(def target-objects (map #(make-target %) targets))
(for [drag draggables target target-objects]
(.addTarget drag target))
On Thu, Nov 15, 2012 at 5:17 PM, Alan Malloy wrote:
> The primary point of let-> is that you can insert it into an existing ->
> pipeline.
>
> (-> foo
> (stuff)
> (blah)
> (let-> foo-with-stuff
> (for [x foo-with-stuff]
> (inc x)))
This use case of the macro now renamed
Part of it is laziness: map is lazy so it doesn't do anything unless you
use the result. In the REPL, you print the result so map runs across the
whole sequence. In the function, only the last expression (draggables) is
returned so it is the only thing fully evaluated.
Your code is very procedural
Here is the short form of the proposal below:
1. Make as-> in Clojure 1.5 have a syntax and semantic matching how fn
is used in pipelines.
2. Rename as-> to fn-> reflecting its similarity to fn.
-- Terje Norderhaug
On Sun, Dec 2, 2012 at 5:30 PM, Terje Norderhaug wrote:
> On Thu, Nov 15, 2012 a
I've wrapped my random uuid generator up in a little library at:
https://github.com/franks42/cljs-uuid-utils
---
cljs-uuid-utils
ClojureScript micro-library with an implementation of a type 4, random UUID
generator compatible with RFC-4122 and cljs.core/UUID (make-random-uuid), a
uuid-string c
You can do:
user=> `[~'foo 1]
[foo 1]
On Sunday, December 2, 2012 10:24:29 AM UTC-8, Conrad wrote:
>
> I remember seeing it somewhere recently but I can't find it now...
>
> As you probably know, if you quasiquote in clojure it automatically adds
> namespaces:
>
> > `[foo ~1]
> [mylibrary.core/f
On Sun, Dec 2, 2012 at 1:42 PM, Jonas wrote:
>
>
> On Sunday, December 2, 2012 7:33:17 PM UTC+2, David Nolen wrote:
>
>> On Sat, Dec 1, 2012 at 12:24 AM, Jonas wrote:
>>
>>>
>>> * Predicates on logic vars:
>>> [(foo (? x number?)) (bar ?x)] => match (foo 42) but not (foo :bar)
>>>
>>
>> This
On Sun, Dec 2, 2012 at 2:11 AM, Evan Mezeske wrote:
>
> That said what's the compelling reason these days for lein-cljsbuild to
>> depend on a specific version of ClojureScript? Are you relying on certain
>> aspects of the analyzer or compiler's API and find that they change quite
>> frequently?
Hmm.. I think you are raising both a technical and a philosophical issue -
what exactly should a higher-order function return when some application of
the supplied function throws exception... The behaviors could be:
1) throw
2) return null
3) return an empty collection (do not continue after 1st
I've got this narrowed down to what seems an interaction issue between
macros and closures in lazy-seq. Run this code:
(defn gen-lazy []
(let [coll [1 2 3]]
(lazy-seq
(when-let [s (seq coll)]
(throw (Exception.))
)
)
)
)
(def lazy (gen-lazy))
(try
(prin
Julian, see my other post, it has nothing to do with map per se.
Apart from philosophical questions, the reason I need this to consistently
raise an exception, is that I want to interrupt the map evaluation when it
is slow, throwing an InteruptedException. I then want to recommence
evaluation l
Hi maclo,
Your code assume there is two "primes" sequences: the result and the one
being constructed. But there's only one and which is infinite.
You define your sequence as being (cons 2 something) and computing
"something" requires evaluating (every? #(pos? (mod 3 %)) (cons 2
something))
since (
33 matches
Mail list logo