Not that it's the answer you're looking for, but usually this is when you
rewrite the code you're testing to use dependency injection (ie, take the
var of interest as an argument instead of a global or in its lexical
environment).
-- Morgon
On Tuesday, July 21, 2015 at 10:54:42 AM UTC-4, Yuri
This might be a bit of a strange or off-topic segue but it got me thinking.
Is there an idiomatic way to handle optional dependencies in Clojure?
Ideally, this macro would be a part of core.match itself (submit a pull
request, get it merged, and whatnot). Of course, you don't want core.match
to
>
> Thanks, that's helpful for me. By chance do you know if the class is
> natively recoverable from the TypeName for Clojure/Java? Class/forName
> can't roundtrip that string. I could implement a look-up table to
> translate between the two formats, but that seems rather kludgey.
>
I actua
rally sound advice, but session cookies in Ring are encrypted
> and MACed, so they can't be changed by the client and remain valid.
> However, cookie sessions do have the disadvantage that they're hard to
> revoke.
>
> On 17 June 2015 at 14:27, Surgo > wrote:
>
&g
Let's not get into the motivation behind this too much -- the exact same
serialization problems exist if you write out the session to a database.
Ring also encrypts the cookies so the above issue is not a problem, it's
only on you to actually choose and protect your encryption key.
I came acros
I've been working on a Ring app that involves storing sessions as cookies,
and within the session there are a couple Java objects that implement
java.io.Serializable. I was somewhat surprised to find that the print-dup
multimethod didn't have native support for Java Serializables, though I can
core.match compiles down to case, does it not? So the comparisons here are
similar: http://insideclojure.org/2015/04/27/poly-perf/
-- Morgon
On Friday, May 15, 2015 at 2:57:23 PM UTC-4, tbc++ wrote:
>
> One big thing to consider is that core.match is closed dispatch. If you
> write a function t
One way to think about documentation is this: you've just written this
great and useful library! You surely want it to be useful and people to
actually use it, right? (See earlier in the thread about Pedestal.) Well,
the only way you'll reach that goal is by having solid documentation that
can
I'm not saying this is everyone's experience or anything, but at times I
have at times considered some deeper STM-work with agents but I could not
seem to penetrate the documentation at the time. I do not know if it's
different now
-- Morgon
On Wednesday, May 6, 2015 at 5:38:08 PM UTC-4, James
Projects like Pedestal do themselves a tremendous disservice with their
poor front pages. It's probably an amazing project but it was very
difficult to get a sense from the README.Md what it could actually do for
me. Whoever owns the Pedestal project, please add a section to the top that
is lit
Maybe I don't entirely understand what a web framework is, but it seems to
me like Immutant is an example of something that might fit into a lot of
the buckets. Could someone explain how that isn't the case?
Thanks,
-- Morgon
--
You received this message because you are subscribed to the Googl
> (rest anything) returns a seq, by definition. It's not about Strings, it's
> the contract of rest. A String is not a seq, but it's viewable as a seq, in
> which case each element of the seq will be a character of the String.
>
> Note that this is not particular to String, but to almost any clojur
> > Not really. (...) is a non-atomic s-expression. If it's evaluated
> > unquoted, the first nested s-expression is evaluated and if it's not
> > callable an exception is thrown. Macros, special forms (which are sort
> > of like system-internal macros and are used to build all the other
> > macros
To help myself learn Clojure, I figured I would write a pattern
matching / destructing macro to better look like languages I'm more
familiar with; i.e., destructuring by [first|second|rest] instead of
[first second & rest]. To do this I'm turning the aforementioned
vector into a string (via str) an
14 matches
Mail list logo