I do the following (with range-length 1e8):
(time (let [[t d] (split-with #(< % 12) (range range-length))]
[(count d) (count t)]))
(time (let [[t d] (split-with #(< % 12) (range range-length))]
(into [] (reverse [(count t) (count d)]
This gives:
"Ela
>
> Please, please, no harsh words about what people besides yourself ought to
> do.
>
I hope my comments the other day didn't come across as harsh - if so, I
apologise, it certainly wasn't my intention. I greatly appreciate the
effort that goes into developing these sites in people's spare time.
2014-07-09 5:11 GMT+02:00 Timothy Baldridge :
> Prefer vectors over quoted lists '(1 2) vs [1 2]. There's rarely a case
> (outside of macros) that you want the former.
>
I did this mostly. The exception is:
(def nodes {
:living-room ['(You are in the living-room.)
'(A
The JVM optimises sections of code that are frequently executed, so the
second expression benefits from the optimisation that happens during the
first expression. My guess is that if you were to swap the two expressions
around, you'd find that the first expression always takes longer, no matter
whi
2014-07-12 11:56 GMT+02:00 James Reeves :
> The JVM optimises sections of code that are frequently executed, so the
> second expression benefits from the optimisation that happens during the
> first expression. My guess is that if you were to swap the two expressions
> around, you'd find that the
Hi, David.
May I ask you - in Om you queue rendering in requestAnimationFrame by passing a
function which calls forceUpdate on the affected components. But as I
understand forceUpdate does not guarantee to execute immediately and is also
queued. So, the rendering should be out of sync with requ
You're right; now that I look more closely, there is a difference between
the two expressions.
The split-with function is literally a combination of take-while and
drop-while, like so:
(defn split-with [pred coll]
[(take-while pred coll) (drop-while pred coll)])
This is important because it m
Hi all,
I have file fileB.clj
(ns a.b.c)
(defn inc-sample [no] (+ no 1))
and file fileA.clj
(ns a.b.c.d
(:require [a.b.c.fileB :as fB]))
(defn method-a []
(println "number incremented" (fB/inc-sample 2))
)
in fileA.clj I'm not able to see the functions from fileB.clj even
Normally, the initial elements of the namespace are used to create directories
and the last element matches the filename. So, for your first example, there
would be an a/b/c.clj file.
Perhaps this is at the root of the issue.
--
You received this message because you are subscribed to the Googl
And alternatively you could declare the first namespace as being a.b.c.fileB
--
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 patie
I want to do something like when you import a file from a clojure package,
for example the case of jdbc, you wrote* (:require [clojure.java.jdbc :as
sql])* than you call functions from clojure jdbc with statement
(sql/fc-name..)
but seams that this not working in case you have two .clj files
I think the root cause is that you need to follow the directory name and
filename conventions. For example clojure.java.jdbc is in a
clojure/java/jdbc.clj file
https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc.clj
--
You received this message because you
Hi All,
Well, I've developed this prime sieve algorithm, which is available
to read and download from the link below: "The Segmented Sieve of Zakiya
(SSoZ)".
http://www.scribd.com/doc/228155369/The-Segmented-Sieve-of-Zakiya-SSoZ
I have implemented it in C++, D, et al, and want to see how we
Well, clojure-grimoire.com is available, FWIW.
Tim
On Saturday, July 12, 2014 2:46:18 AM UTC-4, Reid McKenzie wrote:
>
> While I appreciate the interest, I think that attempting to "officiate"
> Grimoire is a bad move.
>
> We already have "clojure.org". "clojure.org" is the only official site.
I'm using ring.mock.request to test an API. POST parameters work fine, but
for GET requests, the parameters are not where Compojure expects to find
them.
Here is the relevant part of the handler:
(GET "/outlines" [speaker :as r]
(println (str "Request " r))
(pri
You need to make sure your handler has the wrap-params middleware applied
to it in order for it to accept query parameters.
- James
On 12 July 2014 20:41, Jonathon McKitrick wrote:
> I'm using ring.mock.request to test an API. POST parameters work fine,
> but for GET requests, the parameters
Hmm, except I don't have any issues when accessing it via an http client.
Only with the mock.
On Saturday, July 12, 2014 6:24:28 PM UTC-4, James Reeves wrote:
>
> You need to make sure your handler has the wrap-params middleware applied
> to it in order for it to accept query parameters.
>
> -
Here's my handler setup:
(def app
(routes
(-> (handler/api api-routes)
(wrap-params)
(wrap-restful-format)
(wrap-reload))
(-> (handler/site www-routes)
(wrap-resource "public")
(wrap-content-type)
(wrap-reload
On Saturday, July 12, 2014 7:42
Sorry, I just got it... I needed to use 'app' in the test, not 'api-routes.'
On Saturday, July 12, 2014 7:42:53 PM UTC-4, Jonathon McKitrick wrote:
>
> Hmm, except I don't have any issues when accessing it via an http client.
> Only with the mock.
>
> On Saturday, July 12, 2014 6:24:28 PM UTC-4,
Hi,
Just to let you guys know I am paying attention and am trying to get all my
ducks in order. I will definitely check out the resources you've
mentioned. Thank you.
On 11 July 2014 08:11, Adrian Mowat wrote:
> Hi Blake
>
> Brian Marick's book on FP for OO programmers is an excellent book f
I'd like to use memoize for a function that uses core.async http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsub
21 matches
Mail list logo