ANN: Fink-Nottle 0.1.0 (async SQS + SNS client)

2015-06-15 Thread Moe Aboulkheir
https://github.com/nervous-systems/fink-nottle Fink-Nottle is a non-blocking client for Amazon's SQS (queuing) and SNS (push notification) services. There's a blog post here covering the SQS portion of its functionality:

ANN: Hildebrand 0.2.2

2015-06-01 Thread Moe Aboulkheir
First time caller. Hildebrand is an asynchronous pure-Clojure (i.e. no Java AWS dependencies, etc.) DynamoDB client written on top of httpkit. I've been developing it for a while now, and have used it in production, but hadn't gotten around to telling anyone about it.

Re: ANN: Hildebrand 0.2.2

2015-06-02 Thread Moe Aboulkheir
amusement-to-clause ratio. (I think this should influence my own tech writing.) On Tuesday, June 2, 2015 at 2:20:59 AM UTC+2, Moe Aboulkheir wrote: First time caller. Hildebrand is an asynchronous pure-Clojure (i.e. no Java AWS dependencies, etc.) DynamoDB client written on top of httpkit

Re: Clojure on AWS Lambda?

2015-07-05 Thread Moe Aboulkheir
I looked into this a little over the weekend, and wrote a small library lein template/plugin for deploying Clojurescript functions to Lambda: https://github.com/nervous-systems/cljs-lambda There's a blog post / step-by-step tutorial here:

Re: Why I'm getting NPE with zipper/next?

2015-08-21 Thread Moe Aboulkheir
. hubaghd...@gmail.com wrote: Hi, I changed println to z/node , this time I'm getting: NullPointerException clojure.zip/branch? (zip.clj:73) On Friday, August 21, 2015 at 5:56:10 PM UTC+2, Moe Aboulkheir wrote: Hussein, The println inside (recur) will return nil. Take care, Moe

Re: Why I'm getting NPE with zipper/next?

2015-08-21 Thread Moe Aboulkheir
Hussein, The println inside (recur) will return nil. Take care, Moe On Fri, Aug 21, 2015 at 4:35 PM, Hussein B. hubaghd...@gmail.com wrote: Hi, I have this structure: (def s [{n {id a} d 2 children [{n {id c} d 4 children []}]} {n {id b} d 3 children []}]) And I wrote a function with

Re: Why I'm getting NPE with zipper/next?

2015-08-21 Thread Moe Aboulkheir
) On Friday, August 21, 2015 at 6:49:25 PM UTC+2, Moe Aboulkheir wrote: Hussein, How are you constructing your zipper, before passing it to traverse? Note that clojure.zip doesn't work on arbitrary data structures without being given some information about how to descend into/construct nodes

Re: IteratorSequence, dead code?

2015-08-21 Thread Moe Aboulkheir
William, https://clojuredocs.org/clojure.core/iterator-seq previously used it, but as of this commit: https://github.com/clojure/clojure/commit/c47e1bbcfa227723df28d1c9e0a6df2bcb0fecc1 uses RT/chunkIteratorSeq http://dev.clojure.org/jira/browse/CLJ-1669 : IteratorSeq will no longer be used but

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Moe Aboulkheir
Went off half-cocked there. The remainder: (edit-parents #(= 10 (get-in % [a b])) #(update % children reverse), data-zipper) Would have the effect of reversing the order of the children in each node which possesses a child having a b attribute set to 10. You could probably express this

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Moe Aboulkheir
are for editing data structures but I'm not sure how to do it. Thanks for help and time. On Friday, August 21, 2015 at 7:14:13 PM UTC+2, Moe Aboulkheir wrote: Hussein, I don't get an NPE passing that to traverse, but nothing much interesting happens either. The top-level data structure

Re: Why I'm getting NPE with zipper/next?

2015-08-24 Thread Moe Aboulkheir
Hussein, On Mon, Aug 24, 2015 at 5:40 PM, Hussein B. hubaghd...@gmail.com wrote: But now the updated children is using list notation, not vector. Is it ok or it is for displaying purposes? The collection type is now different, as the example I gave uses reverse as the transform, which is a

Re: partition-when?

2015-08-19 Thread Moe Aboulkheir
Laurens, I don't think I've encountered an identical function I can point you to, but here's an alternative implementation: (defn partition-when [pred coll] (lazy-seq (when-let [[h t] (seq coll)] (let [[run remains] (split-with (complement pred) t)] (cons (cons h run)

Re: Examples of core.async usage in production?

2015-10-26 Thread Moe Aboulkheir
I've used core.async in production a bunch with AWS. On Mon, Oct 26, 2015 at 7:24 PM, Robin Heggelund Hansen wrote: There are > postgres.async for async db, and fink-nottle for sending sms/push > notifications/email etc. using core.async. In addition to those services

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Moe Aboulkheir
On Wed, Oct 7, 2015 at 7:47 PM, Moe Aboulkheir <m...@nervous.io> wrote: > Nick, > > (There's a lot to understand about those benchmarks, and I haven't really > spent time with them, or wrk2, so feel free to ignore) > > On Wed, Oct 7, 2015 at 2:13 AM, Nick Pavlica &

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Moe Aboulkheir
On Wed, Oct 7, 2015 at 8:40 PM, Nick Pavlica wrote: > > I'm not currently planning on 1-2 million connections on a single server > at the moment. I really wish I had those problems, but I would like to > count on being able to achieve 100-200K on a single reasonably sized >

Re: Trying to understand Clojure/Java concurrency performance?

2015-10-07 Thread Moe Aboulkheir
Nick, (There's a lot to understand about those benchmarks, and I haven't really spent time with them, or wrk2, so feel free to ignore) On Wed, Oct 7, 2015 at 2:13 AM, Nick Pavlica wrote: > After looking at the numbers in the benchmark, I was a little disappointed > to see

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Moe Aboulkheir
pty copy of x. > > Roelof > > > Op woensdag 7 oktober 2015 20:07:00 UTC+2 schreef Moe Aboulkheir: >> >> Roelof, >> >> Something like this: >> >> (defn palindrome [x] >> (if (string? x) >> (clojure.string/reverse x) >> (i

Re: palingdrome problem (4 clojure)

2015-10-07 Thread Moe Aboulkheir
Roelof, Something like this: (defn palindrome [x] (if (string? x) (clojure.string/reverse x) (into (empty x) (reverse x Alternatively, you may want to consider explicitly using seq on your inputs when you get them, and using that of the basis of comparison & input to reverse. If

Re: My Zipper isn't deleting what I thought is going to delete

2015-08-27 Thread Moe Aboulkheir
, 2015 at 1:59 PM, Hussein B. hubaghd...@gmail.com wrote: Thanks a lot Moe for your help. I always appreciate your patience and skills. Would you explain why your zipper works in this case? Thanks again. On Thursday, August 27, 2015 at 12:11:14 PM UTC+2, Moe Aboulkheir wrote: Hussein

Re: Generalizing - and - forms

2015-08-28 Thread Moe Aboulkheir
On Fri, Aug 28, 2015 at 12:37 PM, Akhil Wali green.transis...@gmail.com wrote: This does work, but it's a bit of whammy. Anyone with suggestions for improvement? It doesn't appear to work for simple cases (where the expressions aren't function calls w/ additional arguments), e.g. (- 1 inc)

Re: Generalizing - and - forms

2015-08-28 Thread Moe Aboulkheir
at 6:07:46 PM UTC+5:30, Moe Aboulkheir wrote: On Fri, Aug 28, 2015 at 12:37 PM, Akhil Wali green.tr...@gmail.com wrote: This does work, but it's a bit of whammy. Anyone with suggestions for improvement? I went over this quickly, though it seems to work OK: (defn threading [x first

Re: Generalizing - and - forms

2015-08-28 Thread Moe Aboulkheir
On Fri, Aug 28, 2015 at 12:37 PM, Akhil Wali green.transis...@gmail.com wrote: This does work, but it's a bit of whammy. Anyone with suggestions for improvement? I went over this quickly, though it seems to work OK: (defn threading [x first? forms] (reduce (fn [x form] (if (seq?

Re: ANN: Fink-Nottle 0.1.0 (async SQS + SNS client)

2015-08-26 Thread Moe Aboulkheir
Matthias, On Wed, Aug 26, 2015 at 9:31 AM, Matthias Diehn Ingesman matth...@ingesman.dk wrote: That looks really useful, and as far as I can tell yours is the only library for SNS. I'm considering using your library in a production app, are there any pitfalls I should be aware of? Nothing

Re: map over a Map with conditional conj

2015-08-25 Thread Moe Aboulkheir
Sven, To me, the keep version would be a lot more readable if it were creating a literal map in a fn. I think (for) is almost always the right thing. It's not as fun to write, but much easier to read: (for [i (range 1 11) :let [id (keyword (str answer_correct_ i))] :when (params

Re: My Zipper isn't deleting what I thought is going to delete

2015-08-27 Thread Moe Aboulkheir
Hussein, Making this change to the zipper definition: (z/zipper #(get % children) #(get % children) (fn [p c] (assoc p children c)) {children z}) looks like it'll do the right thing here. Take care, Moe On Thu, Aug 27, 2015 at 11:03 AM, Hussein B. hubaghd...@gmail.com wrote: The modify

Re: book [clojure programming] confuse

2015-09-08 Thread Moe Aboulkheir
Johnny, On Tue, Sep 8, 2015 at 11:32 AM, Johnny Wong wrote: > > why " deliver a @b is going to fail " ? 1 and 2 are just two > independent threads , "deliver a 42" will unblock thread 2 , and then > thread 1 will be unblocked . > Thread 1 is waiting on delivering a

Re: Why (memoize (fn [_#] (gensym "node")) in rhizome?

2015-09-12 Thread Moe Aboulkheir
On Sat, Sep 12, 2015 at 1:58 AM, Sam Ritchie wrote: > Seems like a good use of “delay”, yeah? Slightly different calling > semantics, of course, but still: > > user> (def f (delay (gensym "node"))) > #'user/f > user> @f > node3330 > user> @f > node3330 > The original code

Re: 4clojure count problem

2015-10-04 Thread Moe Aboulkheir
re to put the initial value. > > These two do not work : > > (reduce (fn [counter] (inc counter)) 0 [1,2,3]) > (reduce (fn [counter] (inc counter) 0 ) [1,2,3]) > > Op zaterdag 3 oktober 2015 23:34:20 UTC+2 schreef Moe Aboulkheir: >> >> Roelof, >> >> Unless sup

Re: 4clojure count problem

2015-10-03 Thread Moe Aboulkheir
Roelof, Unless supplied with an initial value, reduce will use the first value from the collection you supply - every sequence which doesn't start with "1" will give you the wrong answer. Take care, Moe On Sat, Oct 3, 2015 at 9:40 PM, Roelof Wobben wrote: > Hello, > >

Re: Testing concurrency/async features with clojure.test

2015-09-26 Thread Moe Aboulkheir
Jonathon, Blocking at read time, within the test (via wrote: > If I have code in a go block or a future call, what is the best way to > automate test coverage of that code? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this

Re: Generalizing - and - forms

2015-08-28 Thread Moe Aboulkheir
On Fri, Aug 28, 2015 at 11:51 PM, Alan Thompson clooj...@gmail.com wrote: I have become very partial to a simple adaptation of as- from the Tupelo Core https://github.com/cloojure/tupelo library. I almost always like to be explicit about the location the previous value, since either - or -

Re: Questions about channels

2016-01-06 Thread Moe Aboulkheir
I just noticed you were actually using the exit code. In that case, you probably want something like (.on p "close" (fn [exit] (put! c [:exit exit]) (a/close! c)) Take care, Moe -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: Questions about channels

2016-01-06 Thread Moe Aboulkheir
On Wed, Jan 6, 2016 at 9:48 PM, wrote: > I'm using ClojureScript and nodejs and I'd like to spawn a child process > and deal with the result (stderr, stdout, exit code). > > Here's a short gist > showing an >

Re: channels 1:1, callbacks many:many ?

2015-11-25 Thread Moe Aboulkheir
On Wed, Nov 25, 2015 at 6:42 AM, wrote: > > So how does one use channels if one is accustomed to registering several > callbacks to a single event? Do you have an intermediary which takes one > value from the source channel and then puts the value on as many other > channels as

[ANN] kvlt 0.1.0: JVM/Node/browser HTTP client

2016-02-27 Thread Moe Aboulkheir
kvlt is an HTTP client library which runs on the JVM, Node & in browser, including support for server-sent events and websockets. Github project page Documentation & examples *Motivation*: while there exist dual-targeted

Re: grouping and mapping

2016-08-12 Thread Moe Aboulkheir
As far as already existing, (grouped-map first (comp str/upper-case second) ...) or similar, with https://github.com/plumatic/plumbing/blob/master/src/plumbing/core.cljx#L164 Take care, Moe On Fri, Aug 12, 2016 at 6:10 PM, Erik Assum wrote: > I’ve been working on a new project

ANN: Shapeshiftr 0.1.0 - altcoin conversion

2016-09-07 Thread Moe Aboulkheir
shapeshiftr is a Clojure/script client for the shapeshift.io cryptocurrency/altcoin exchange, which allows easy conversion of a variety of currencies (without any need for registration). The remote API is CORS-enabled - the client works in browsers

Re: Just quick review - "idiomaticy" check (Selection sort)

2016-10-10 Thread Moe Aboulkheir
Here's an example w/ iterate & a simpler 'smallest': (defn- smallest [xs] (->> xs (map-indexed vector) (sort-by second) first)) (defn selection-sort [s] (->> (iterate (fn [[acc xs]] (let [[i x] (smallest xs) [l r] (split-at i xs)] [(conj acc x)

Re: Why is this not considered to be in a go block?

2016-08-26 Thread Moe Aboulkheir
On Sat, Aug 27, 2016 at 12:08 AM, mond wrote: > Is that the same thing or have I made a(nother) / different mistake? > > At a glance, it looks like the functions you're passing into map and filter are shaped wrong - (comp (map sse-data) (filter matching-event-client-filter))

Re: join* tables from csv

2016-10-18 Thread Moe Aboulkheir
(defn join* [d1 c1 d2 c2] (clojure.set/join (into #{} d1) (into #{} d2) {c1 c2})) Or else look at the implementation of set/join. Take care, Moe On Tue, Oct 18, 2016 at 9:41 AM, wrote: > Hey guys, i'm beginner and need help. > > I have a task: > > ;; (join*

Re: Clojure resume tips?

2017-03-23 Thread Moe Aboulkheir
Jason, If it were my resumé, I would consider including only the technologies I had interest in working with professionally. Getting involved in collaborative open source development (i.e. contributing to established projects) is likely to increase your confidence, as well as that of a

Re: Hexing the Technical Interview

2017-04-06 Thread Moe Aboulkheir
Love it. -- 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 patient with your first post. To unsubscribe from this group, send

Re: Contribute Specter to Clojure core?

2017-03-04 Thread Moe Aboulkheir
On Sat, Mar 4, 2017 at 6:35 AM, Asim Jalis wrote: > What might be a Clojurey syntax for doing path navigation? In other words > how could get-in be extended so that it could parse nested vectors like it > parses nested maps? Thinking out aloud, an integer in the path when

Re: Reducing Jar file size for AWS Lambda

2017-07-20 Thread Moe Aboulkheir
Jose, Leaving aside shrinking the jar, you could try: - Structuring your application so it's easier to construct plausible inputs in the tests / REPL - Using https://github.com/lambci/docker-lambda locally, to get an environment closer to the deployment target - Deploying to a geographically

ANN: sputter, a Clojure implementation of the Ethereum VM

2017-10-18 Thread Moe Aboulkheir
I've been working on an ongoing series of blog posts documenting the development of sputter , an immutable EVM implementation Today's instalment is available here . The first post

Re: State & GUIs

2017-12-02 Thread Moe Aboulkheir
It may make sense to familiarise yourself with the architecture of a Clojurescript + React web application, if that's not something you've recently investigated. Regardless of whether the techniques are directly applicable to your problem, I think the relationship between the state and the UI is

Re: Future

2018-05-19 Thread Moe Aboulkheir
(doall (pmap (range ...))) may be a viable approach also, depending on the behaviour you want. On Sat, May 19, 2018 at 11:42 PM, Renata Soares wrote: > It worked, thanks! > > Em sábado, 19 de maio de 2018 19:38:28 UTC-3, Alex Engelberg escreveu: >> >> Not sure what's

Re: [ANN] Leiningen template aws-lambda-serverless

2018-06-02 Thread Moe Aboulkheir
There's some casual treatment of performance in this blog post: https://nervous.io/clojure/clojurescript/aws/lambda/node/lein/2015/07/05/lambda/ For those interested in cljs, https://github.com/nervous-systems/serverless-cljs-plugin permits the deployment of cljs projects via sls. Take care, Moe

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-23 Thread Moe Aboulkheir
On Mon, Jul 23, 2018 at 3:29 AM, Christian Seberino wrote: > This might surprise some but I actually think some things are more > elegant in Clojure than Scheme! > Expect these revelations to continue. -- You received this message because you are subscribed to the Google Groups "Clojure"

Re: OK idea to replace conj and cons with "prepend" and "append" macros that have consistent behavior and return same types as args?

2018-07-18 Thread Moe Aboulkheir
Christian, Nice to have you here. I guess a couple of things are being discussed in parallel - a few trivial points: - 'you always get back a value of the concrete type you supplied for argument X' isn't obviously less cognitively burdensome than 'you always get back a sequence' - doesn't

Re: How to apply multiple values to a function

2018-03-28 Thread Moe Aboulkheir
Renata, It depends on what you want to with the results of treat-request. If you don't care about them, which seems like the case: (doseq [[x y z] [x1 y1 z1] [x2 y2 z2] [x3 y3 z3]] (treat-request x y z)) Is one way to accomplish it. If you want a

Re: How to apply multiple values to a function

2018-03-28 Thread Moe Aboulkheir
Missed a set of parens: On Thu, Mar 29, 2018 at 1:25 AM, Moe Aboulkheir <m...@nervous.io> wrote: > Renata, > > It depends on what you want to with the results of treat-request. If you > don't care about them, which seems like the case: > (doseq [[x y z] [[x1 y1 z1]

Re: Best way to unit test

2018-03-29 Thread Moe Aboulkheir
bj, Is 'current-date' a top-level var in that file? If so, a good start might be a test which used with with-redefs to supply a contrived value for 'current-date', and then validated dates on either side of it. It may be less brittle to support

Re: [ANN] com.walmartlabs/cond-let 1.0.0

2018-10-04 Thread Moe Aboulkheir
See https://funcool.github.io/cats/latest/#mlet for something closer to home, in the monadic vein. On Thu, Oct 4, 2018 at 4:10 PM Gary Trakhman wrote: > These are all just sugar over monadic bind, right? > > Here's one way to do it in the ocaml alternate universe: >

Re: The magic of Lisps

2019-05-03 Thread Moe Aboulkheir
On Sun, Apr 28, 2019 at 10:46 AM Erik Assum wrote: > I see, and acknowledge that eg the go-macro core.async is a wonderful > piece of work, and that it’s really cool that it could be done in a > library. But as an application programmer, I really don’t care if it’s a > macro or a language

Re: Suspended var swaps in core.logic.nominal

2023-11-11 Thread Moe Aboulkheir
According to the wiki: *In core.logic.nominal, we implement suspensions as constraints. During swapping of a and b, whenever we encounter a variable x, we replace it with a fresh variable x' and add the suspension constraint swap [a b] x' x. This swap constraint is executed under one of two

Suspended var swaps in core.logic.nominal

2023-11-11 Thread Moe Aboulkheir
Afternoon, I'm new to core.logic, and was working through the αKanren paper with core.logic.nominal. On page 4, there is an example which translates to: *(l/run* [q] (n/fresh [a b](l/fresh [x y] (l/== (n/tie a (n/tie a x)) (n/tie a (n/tie