Re: s/valid? does not tell me if the data is valid as supplied

2018-02-26 Thread Wilker
I've written a library that tries to solve this, instead of making conforms that do coercion, it uses the spec and a separated registry to conform the value (similar to what spec does to find the generators for a given spec). You can find the library at: https://github.com/wilkerlucio/spec-coerc

Re: Datomic query question

2015-06-04 Thread Wilker
ount ?lessons) > > :where > [?t :track/name ?track] > [?lessons :lesson/track ?t]] > db)) > ;=> [["bar" 1] ["foo" 3]] > > > This is because the aggregation is done over an unaggregated result *set* > (i.e.

Datomic query question

2015-06-04 Thread Wilker
Hi, good morning. I have this query here: [:find ?track (count ?lessons) :where [?t :track/name ?track] [?lessons :lesson/track ?t] ] A lesson has a track (so a track can be on multiple lessons), and with this query I can return the track names and the number of lessons where this track is be

Re: calling functions that accepts keyword arguments with a map

2015-02-13 Thread Wilker
> > Generally, however, I find that keyword arguments are more trouble than > they're worth. You only save two characters, and give up a lot on terms of > being able to easily compose and extend functions. > > - James > On 13 February 2015 at 17:30, Wilker wrote: > >

Re: calling functions that accepts keyword arguments with a map

2015-02-13 Thread Wilker
t; user=> (apply concat {:colors ["red" "blue"] :cursor-set #{"pointer" > "hand"}}) > (:colors ["red" "blue"] :cursor-set #{"hand" "pointer"}) > > Andy > > On Fri, Feb 13, 2015 at 9:44 AM, Francis Avi

calling functions that accepts keyword arguments with a map

2015-02-13 Thread Wilker
Hi guys, I'm trying to find the best way to call a function that accepts keyword arguments (in my case it's the set-style! on Enfocus library) with a map. So, an example of the regular call: (set-style :color "red" :cursor "pointer") I would like to call with a map (because that way I can manag

Re: transducers and async operations

2014-09-23 Thread Wilker
Yeah, I'm going to let it go, hopefully I'll find some way of handling it on future, for now keeping the extra versions is not that bad. Thank you everyone. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Mon, Sep 22, 2014 at 6:01 PM, Leon

Re: transducers and async operations

2014-09-22 Thread Wilker
le, than I can accept the limitations and keep all my custom versions that can handle async processing... Thanks. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Mon, Sep 22, 2014 at 4:22 PM, Leon Grapenthin wrote: > The steps of your transducer composition

Re: transducers and async operations

2014-09-21 Thread Wilker
t +55 81 82556600 On Mon, Sep 22, 2014 at 12:00 AM, Wilker wrote: > Ok, I think a got into a reasonable solution :) > > The code first: > > (defn -expand [v f] > (if (satisfies? cljs.core.async.impl.protocols/ReadPort v) > (take! v f) > (f v))) > > (defn asy

Re: transducers and async operations

2014-09-21 Thread Wilker
/bio Woboinc Consultant +55 81 82556600 On Sun, Sep 21, 2014 at 11:29 PM, Wilker wrote: > Hi, I did some progress here, I was able to manage to create a custom > filter transducer that works seamlessly with regular values and channels > and can be composed with other transducers: > >

Re: transducers and async operations

2014-09-21 Thread Wilker
#(>= % 2))) ; now filter sync c (chan 1 xform)] (async/onto-chan c [1 false 2 3]) (go (println (http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Sun, Sep 21, 2014 at 10:39 PM, Wilker wrote: > > On Sun, Sep 21, 2014 at 10:08 PM, Sean Corfield wrote:

Re: transducers and async operations

2014-09-21 Thread Wilker
, it just would be nice if I could get the same clean way to build my pipeline like I did before, but with transducers. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: transducers and async operations

2014-09-21 Thread Wilker
On Sun, Sep 21, 2014 at 8:53 PM, Wilker wrote: > Because it's Node-JS environment, and that can be the same for any async > Javascript, you never wanna call sync operations (like sync ajax) because > they block everything... > > I was noticing that is a non-issue at all in J

Re: transducers and async operations

2014-09-21 Thread Wilker
ample: (filter (comp http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Sun, Sep 21, 2014 at 8:50 PM, Leon Grapenthin wrote: > Why would you want the the predicates and readdir to return channels? > > On Monday, September 22, 2014 12:14:27 AM UTC+2, Wilker wrote: >

Re: transducers and async operations

2014-09-21 Thread Wilker
world were you can't deref a channel into a sync fashion. But the point remains, there is way to seamlessly handle async and sync operations using the same transducers? Or something like it. Best regards. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Su

transducers and async operations

2014-09-21 Thread Wilker
ere is a better way to handle those cases? I would love to know how you guys are handling those kind of situations. Thanks. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 -- You received this message because you are subscribed to the Google Groups "Cloj

Re: Rich Hickey's Transducers talk from Strange Loop

2014-09-19 Thread Wilker
Awesome! Thank you very much! --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Fri, Sep 19, 2014 at 5:33 PM, Bruce Durling wrote: > Alex, > > Thanks for getting the videos up so quickly! > > cheers, > Bruce > > On Fri, Sep 19, 2014

Re: [ANN] www.core-async.info: a new web resource for core.async

2014-09-19 Thread Wilker
a kind hard to navigate, on the first page you have to go all the way on a small link to continue to the next step, would be nice to have a general full index (like a book) and consistent buttons to navigate back/forward. Besides that, nice job, thanks for taking the effort to make it :) --- Wi

Re: [ANN] Clojure Videos (with options for Linux users)

2014-09-19 Thread Wilker
Nice, started watching yesterday, they are awesome. Thank you very much. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Fri, Sep 19, 2014 at 3:49 AM, Gomzee wrote: > I tried to open this link (https://tbaldridge.pivotshare.com). Its not > workin

Re: ANN: ClojureScript 0.0-2341, Improved Analysis & Transducers

2014-09-19 Thread Wilker
Thank you for the release. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Fri, Sep 19, 2014 at 12:49 PM, Alan Dipert wrote: > Here is a bookmarklet that turns /CLJS-\d+/ text into link: > https://dl.dropboxusercontent.com/u/12379861/cljsjir

Re: it's possible to query for optional parts on many relations?

2014-09-18 Thread Wilker
pe" my data at query time, so, if there is a way to do it, I would love to know. Thanks. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Thu, Sep 18, 2014 at 7:48 PM, Ashton Kemerling wrote: > Couldn't you just retrieve users and use "e

Re: it's possible to query for optional parts on many relations?

2014-09-18 Thread Wilker
Forgot to mention, I tried the (get-else) but it raises an error about cardinality many not supported, so I guessed it doesn't works here... --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Thu, Sep 18, 2014 at 7:41 PM, Wilker wrote: > Hi > >

it's possible to query for optional parts on many relations?

2014-09-18 Thread Wilker
gards. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 -- 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 mod

Re: jetty restart failing

2014-09-18 Thread Wilker
Nice tricks, thanks again :) --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Tue, Sep 16, 2014 at 7:51 PM, James Reeves wrote: > On 16 September 2014 17:06, Herwig Hochleitner > wrote: > >> 2014-09-16 17:28 GMT+02:00 James Reeves : >>

Re: jetty restart failing

2014-09-15 Thread Wilker
Thank you very much Herwig! The (.join jetty) did the trick :D --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Mon, Sep 15, 2014 at 8:50 PM, Herwig Hochleitner wrote: > Feel free to steal from my jetty component: > https://github.com/webnf/webn

Re: jetty restart failing

2014-09-14 Thread Wilker
w seconds, but it doesn't... Jetty seems to hang on an never closes... For that my guess is that some pending operation is going on preventing it from shutting down at all... A fix could be a way to force Jetty to close and wait until it's actually closed. Thanks for the help. --- Wilker Lú

Re: jetty restart failing

2014-09-13 Thread Wilker
. Thanks. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Sat, Sep 13, 2014 at 8:20 PM, Wilker wrote: > Hi, > > I'm trying to apply the ideas from the component library: > https://github.com/stuartsierra/component > > My problems is bei

jetty restart failing

2014-09-13 Thread Wilker
n I try to reset: Error starting #}, :handler #, :handler-ext #}, :port 8000, :join? false, :jetty nil, :log #}, :system #}> Seems that it tries to start the server before it have time to shut it down. Any of you had a similar issue or know how to work around that? Thanks. --- Wilker Lúcio http:/

[ANN] lein-node-webkit-build

2014-09-11 Thread Wilker
st regards --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 -- 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 m

Re: can't connect with Datomic transactor

2014-09-08 Thread Wilker
Actually, I just got an answer on the Datomic list, the problem is that I'm using Clojure 1.7.0-alpha2. So, just have to wait for a new version now. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Tue, Sep 9, 2014 at 1:12 AM, Wilker wrote: >

Re: can't connect with Datomic transactor

2014-09-08 Thread Wilker
#x27;t give any clue about what's wrong... I really believe that's something with my env, but it's being really hard to track down what it is. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Mon, Sep 8, 2014 at 6:13 PM, Josh Lehman wrote: &

can't connect with Datomic transactor

2014-09-07 Thread Wilker
at to do to fix it... You guys know what this issue is about? Thanks. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: How to use Java library from sources

2014-09-02 Thread Wilker
Thanks guys, I'll try it out :) --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 On Tue, Sep 2, 2014 at 2:03 PM, Jony Hudson wrote: > I think if you're going to distribute a Leiningen plugin then you'll > either need to publish pecoff4j

How to use Java library from sources

2014-09-02 Thread Wilker
my project is a Leiningen plugin, so I need to have this dependency shared with the plugin users. Thanks. --- Wilker Lúcio http://about.me/wilkerlucio/bio Woboinc Consultant +55 81 82556600 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: partial, but instead of args + additional, get additional + args

2011-10-20 Thread Wilker
Hi Miekel, The main reason is because I feel it is more expressive, and I really love expressive code :) --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Thu, Oct 20, 2011 at 9:10 PM, Meikel Brandmeyer wrote: > Hi, > > Am 21.10.2011 um 06:01 sch

partial, but instead of args + additional, get additional + args

2011-10-20 Thread Wilker
le #(< % 2000) primes) I mean, there is no such function on default that works as reversed arguments partial (appending partial arguments at end instead of beginning)? If it don't, is not a good idea to have one? --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 825

Re: StackOverflowError in prime function

2011-09-22 Thread Wilker
Alf, I mean it will be even better if you just generate an infinite lazy sequence that generates primes, I mean will be really more cool :) --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Thu, Sep 22, 2011 at 1:36 PM, Alf Kristian Støyle wrote: >

Re: advantage of dynamic typing

2011-09-20 Thread Wilker
to be present, and that's all... I really don't like to mix up clojure code with Java, when I really need Java, I always write some wrappers, so when I use it feels more Clojure. --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Tue, Sep 20, 2

Programmer Day

2011-09-13 Thread Wilker
(println (apply str (map char [72 97 112 112 121 32 80 114 111 103 114 97 109 109 101 114 32 68 97 121 33]))) --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: Land of Lisp music video

2011-09-02 Thread Wilker
Because of you I know had to spend $40 do get this e-book :P hehe --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Fri, Sep 2, 2011 at 6:59 PM, Tassilo Horn wrote: > finbeu writes: > > > Just found this: > > > > http://www.youtube

Re: Finite lazy sequence

2011-09-02 Thread Wilker
Solved by wrapping iterate on take-while :) (defn tokens-sec [string] (take-while identity (iterate (fn [[_ _ string :as info]] (if (> (count string) 0) (next-token info))) [0 0 string []]))) --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556

Finite lazy sequence

2011-09-02 Thread Wilker
e end? Or there is another way that I can't see to make this lazy list works this way? --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

test a serie list

2011-09-02 Thread Wilker
in one, I tried some (for) loops but it made the test run no assertion at all... This is my (for) trial (don't works): (deftest test-compute-hash (for [{:keys [path hash]} (vals subdb-test-data)] (is (= hash (subdb-hash path)) "hash don't match"))) How I can make this works

Re: Top secret clojure project names

2011-09-02 Thread Wilker
Never say "bug free", the bugs will hear... --- Wilker Lúcio http://about.me/wilkerlucio/bio Kajabi Consultant +55 81 82556600 On Thu, Sep 1, 2011 at 8:47 PM, Islon Scherer wrote: > I have a big clojure project at work but it's not a secret. It > superseded a old java pro