What is the reason for the dropping buffer not supporting size 0?
Why the most trivial option of "no buffering" is not supported out of the box
by core.async?
On Thu, Jan 1, 2015 at 11:31 AM, Jozef Wagner
wrote:
> Implement a custom buffer type, or use mult. With mult, use tap/untap to
> contr
Hey Tzach,
If I understand what you're trying to do, you want something like this:
[ :uint32
:ubyte ;; or bit-seq, depending
(delimited-block (prefix uint24 #(- % 5) #(+ % 5))) ]
And then you'll need to parse the final block separately. I've left
defining the uint24 as an exercise for the
I'm not sure whether this counts as an answer. I put this definition in a
file that my leiningen project loads by default:
(defn set-pprint-width
"Sets width for pretty-printing with pprint and pp."
[cols]
(alter-var-root
#'clojure.pprint/*print-right-margin*
(constantly cols))
Hi,
Is it possible to change default value of
clojure.pprint/*print-right-margin* var and alikes in one place. I use
pprint in many places and would like to avoid wrapping it with "binding" in
every case.
Thanks,
Andy
--
You received this message because you are subscribed to the Google
Groups
Akos Gyimesi wrote:
every function call has a
corresponding mock call in the test, so whenever you modify the
implementation (without even changing the top-level result) you have to
modify the tests as well, and vica-versa. I once encountered a codebase
that had thousands of lines of such "tests"
Akos Gyimesi wrote:
Now, later that day I decide that I pass the whole user object to the
check-pw function. Maybe I want to use the user ID as a salt, or maybe I
just want to leave the possibility for checking password expiration,
etc. So I modify the test and the implementation of check-pw so
Thank you for all the responses! To be honest, I hoped that someone
would explain why this mocking style is a good thing, and I just
misunderstand something about the "top-down development" that the Midje
wiki suggests:
https://github.com/marick/Midje/wiki/The-idea-behind-top-down-development
Wh
Hi!
2015-01-06 20:25 GMT+01:00 Noam Ben-Ari :
> Hi,
>
> I've written a small library (1 ns, 100 lines) to transform nested maps
> from "dash-case" keys to "camelCase" keys and back.
>
> The original use case was taking MySQL records that use camelCase field
> names and convert them to dash-case s
If you want to boost performance a bit just memoize the conversion
functions. Memoize makes you vurnable to exploits though, better use
something with WeakRefs if you convert anything from untrusted sources (eg.
guava CacheBuilder). But given your usecase this will probably be the
biggest gain,
Btw, if you own the defrecord, extend a protocol to it directly in its
definition, rather than in a separate extend or extend-protocol form.
Doing it inline makes the record implement the protocol's backing
interface, which will be much more efficient. (If it's not your record you
don't really
On further investigation, it looks like you're suffering from
http://dev.clojure.org/jira/browse/CLJ-979 -- if I apply the patch for this
bug to clojure and recompile your project everything works fine. It looks
like this patch *is* slated to make it into Clojure 1.7.0, so that should
also make you
TL;DR: If you wait for that lein-ring pull to get merged, you can upgrade
lein-ring and your problem will go away. If you wait for Clojure 1.7.0 it's
possible your problem will go away, though I'm less confident here (the
current alpha doesn't have a fix). If you want your problem to go away
*right
lein-ring uses AOT compilation to build war files. AOT compilation in
clojure is, well, problematic sometimes. Fortunately it can almost always
be avoided using clever indirection.
For example: https://github.com/pdenhaan/extend-test/pull/1 builds a war
that works =)
I've got a pull open against
Thanks for this, Andy.
I see it uses postwalk and recursion for nested maps, so it will eventually
blow up the stack. Probably faster than a zipper though.
Also, for changing case it uses a custom split and join instead of regex, a
very interesting approach.
I won't be using it directly though
I have not used it, but from the docs it appears there is at least some
overlap with this library:
https://github.com/qerub/camel-snake-kebab
It mentions in its docs that it avoids using regex's.
Andy
On Tue, Jan 6, 2015 at 11:25 AM, Noam Ben-Ari wrote:
> Hi,
>
> I've written a small libr
Hi,
I've written a small library (1 ns, 100 lines) to transform nested maps
from "dash-case" keys to "camelCase" keys and back.
The original use case was taking MySQL records that use camelCase field
names and convert them to dash-case so they don't stick out like a sore
thumb in my code. Simi
Solved bro! I think the error comes because my Ubuntu that should equipped
with fortranlib3 library. Clatrix work like a charm! Thanks for the
response
On Sunday, January 4, 2015 6:12:43 AM UTC-5, Byan Jati wrote:
>
> I have 2 matrix, matrix A = [[1 2 3][4 5 6]] and matrix B = [[10 20][20
> 30
There is also vertx.io with the clojure module.
Josh
On Tue, Jan 6, 2015 at 3:43 PM, Max Penet wrote:
> Jet is already very usable and used in production by some notable
> projects/clients.
> I am also working on improving the backpressure story on all fronts at the
> moment (matter of few days
Hi all,
I want to parse a stream of text which comes from a java.io.Reader with
https://github.com/Engelberg/instaparse.
But the stream of text will only start with what can be parsed by my
grammar. The rest of the text stream must be
consumed/parsed with some other grammar. I know of instpars
I'm a relative newcomer to Clojure, and I'm puzzled by problems I have
using extend in a webapp. Any help would be hugely appreciated.
My use case is basically this:
(defrecord FooRecord [msg])
(defprotocol FooProtocol
(bar [foo] "to use with extend-type"))
(extend FooRecord
FooProtocol
+1 - I think we are saying the same thing (not sure if you meant to
reply to me?)
On 6 January 2015 at 14:35, Timothy Baldridge wrote:
> I think the answer to questions like this is that you are testing the wrong
> thing, or more correctly you are writing incomplete tests.
>
> In your example, yo
I think the answer to questions like this is that you are testing the wrong
thing, or more correctly you are writing incomplete tests.
In your example, you stubbed out check-pw. But calling check-pw has a
contract, a contract that (at the moment) only exists in your head, but a
contract none-the-l
Fixed in master thanks to Michal Marczyk!
David
On Tue, Jan 6, 2015 at 3:05 AM, Fluid Dynamics wrote:
> On Monday, January 5, 2015 2:27:03 PM UTC-5, Feng Xue wrote:
>>
>> These days, I was trying to utilize function hash in
>> clojure/clojurescript to generate unique id, but it turns out this f
I just want to perform matrix multiplication by mmul with Matrix A and B
(mmul A B), but i got this error :
java.lang.UnsatisfiedLinkError :
org.jblas.NativeBlas.dgemm(CCIIID[DII[DIID[DII)V
(Unknown Source) org.jblas.NativeBlas.dgemm . . . blablabla
I'm using [net.mikera/core.matrix "0.32.1"]
I don't think there is an easy answer here, and note that this is a problem
generic to mocking (i.e. not clojure or midje specific).
The usual advice applies though:
- do you really need to mock? Unit testing is about the coarseness of
granularity which is defined more by cohesion and abstract
Akos,
that is exactly the kind of problem I'm talking about! Right down to the
detail about stopping work and returning to the project later, and seeing
all the tests pass!
--
Jonathon McKitrick
On Tue, Jan 6, 2015 at 3:22 AM, Akos Gyimesi wrote:
>
> On Sat, Jan 3, 2015, at 02:46 AM, Brian M
I'd suggest taking a look at the alts! function in core.async (or the
equivalent alt! macro).
On Monday, 5 January 2015, Thomas wrote:
> Thank you all for you valuable feedback. I really appreciate it and the
> suggestions are really good.
>
> Thomas
>
> --
> You received this message because yo
Jet is already very usable and used in production by some notable
projects/clients.
I am also working on improving the backpressure story on all fronts at the
moment (matter of few days at most).
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To p
Some jetty adapters also supports the async interface using core.async:
https://github.com/mpenet/jet.
Also, for async database access, I'm currently working on suricatta library
(sql toolkit on top of JOOQ) and it exposes a simple async interface for
execute queries asynchronously in a shared thr
AFAIK https://github.com/ztellman/aleph is the current best async IO
library.
Jozef
On Tue, Jan 6, 2015 at 7:20 AM, Ricardo Gomez
wrote:
> There are, it'll just never happen.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this
On Sat, Jan 3, 2015, at 02:46 AM, Brian Marick wrote:
>
> > I use TDD and mocking/stubbing (conjure) to test each layer of my code.
> > The problem is when I change the function signature and the tests do not
> > break, because the mocks/stubs do not know when their argument lists no
> > longer a
On Monday, January 5, 2015 2:27:03 PM UTC-5, Feng Xue wrote:
>
> These days, I was trying to utilize function hash in clojure/clojurescript
> to generate unique id, but it turns out this function has very strange
> behaviour to empty vector parsed from read-string in cljs with in clj.
>
> In cloj
32 matches
Mail list logo