On Apr 26, 5:25 pm, David McNeil wrote:
> I am experimenting with clojure.test and I encountered the following
> situation which I cannot explain.
>
> This code:
>
> (println (do
> (ns ns01
> (:use clojure.test))
> (deftest test1 nil)
> (run-tests)))
>
ount/start args)
(netty/wait-for-close server/http))
On Wednesday, June 8, 2016 at 7:53:25 AM UTC-7, Nate Young wrote:
Good morning (at least from my part of the globe),
I spent a good chunk of time last night wondering why this chunk
of code
kept exiting about a minute after being
You can "capture" symbols from the surrounding context, making them
available to the body of your macros, the "tilde tick trick" is what
you're looking for there:
(defmacro deftransducer
[body]
`(fn [reducing-fn#]
(fn
([] (reducing-fn#))
instead:
(p/defparser optional [p default-value]
(p/either (p/attempt p) (p/always default-value)))
(p/defparser p []
(p/let->> [h (optional (helloParser) nil)
w (worldParser)]
(p/always [h w])))
Hope that helps.
Nate Young
--
--
You received this message because y
On 08/16/2010 04:12 PM, leo wrote:
I am trying to understand how efficient it would be to use Clojure to
develop an asynchronous http client for my webapp instead of using
Java. Is there any specific way one can be better than the other?
Bradford Cross of FlightCaster just wrote an excellent ar
> This creates a classes/midje/ directory full of class files. (QUESTION: Why
> create a bunch of class files when Midje is in lib/ as a jar file?)
leiningen's compile task calls clojure.core/compile for every
namespace you specify in your project.clj. clojure.core/compile sets
the *compile-files
he `(tok (array-item))` in an
`attempt` and then making the closing paren a `tok` will get you the
list-parser you're looking for:
(defparser arr []
(between (char LPAREN) (tok (char RPAREN))
(many (attempt (tok (array-item))
Cheers,
Nate Young
--
You received this
On Thu, Aug 23, 2012 at 9:24 AM, Alexsandro Soares
wrote:
> Ok. Thanks for the answer.
>
> Is there any way to get the line and column?
The Parsatron doesn't have any builtin facilities for extracting line
numbers from tokens, you'd have to keep track of the number of newline
characters your parse
On Thu, Aug 23, 2012 at 11:22 AM, Alexsandro Soares
wrote:
> Can you provide the code for this?
Certainly.
The parser's current source position is stored in the InputState
record's `pos` field. That field is a SourcePos record consisting of
the current line and column position. Most parsers, howe
On Wed, Aug 29, 2012 at 4:03 PM, Erlis Vidal wrote:
> If yes, how can I do a recursive call when passing the function as a
> parameter to another function, like in this case with mapcat?
You could use `lazy-seq`. Something like this:
(defn my-flatten [x]
(lazy-seq
(if (coll? x)
(mapca
On Thu, Oct 18, 2012 at 10:16 AM, larry google groups
wrote:
> Okay, this is very confusing to me. If I try this:
>
> (defn add-to-logged-in-registry [this-users-params]
>
> (let [right-now (. (Date.) getTime)
> new-user-entry (conj this-users-params { "updated" right-now })]
> (sw
On 10/28/2011 09:42 AM, AndyK wrote:
> I am setting up tests with clojure.test that are driven by a CSV where
> each line represents one test case. Right now, there is a single
> deftest function that runs all the assertions. That's ok but creates
> reporting like 1 test was run with 1000s of asser
On 11/01/2011 03:05 PM, AndyK wrote:
> How would (run-tests 'my-namespace) know to run all those dynamic
> tests? I thought that it parsed the namespace for 'my-namespace when
> you call it. Or is it that the call to defcsvtests sets off a chain of
> macro resolutions before run-tests can even do i
On 11/08/2011 12:44 PM, AndyK wrote:
> I finally had a chance to try this out and it fails with
>
> error: java.lang.ClassCastException: java.lang.String cannot be cast
> to clojure.lang.IObj
> Compilation failed.
I think I fat-fingered my deftest-form definition:
I originally wrote:
(defn testde
There's also ABCL, the Common Lisp implementation that maintains the
inalienable right to arm bears, written in Java and supporting interop
between both Java and Lisp.
http://common-lisp.net/project/armedbear/doc/abcl-user.html
On 11/15/2011 09:13 AM, Dennis Crenshaw wrote:
> I haven't dealt with
On 12/17/2010 09:54 AM, Trevor wrote:
> 2. Is there a form for anonymous macros?
>
> i.e. I know I can do : (fn[x](do x)), but can I not do: (macro[x](let
> [x# x] `(do x))) ?
>
> Thanks!
>
A little tardy, but Konrad Hinsen has written a handful of CL-like
functions for symbol macros and macr
16 matches
Mail list logo