(apologies for the resend; this didn't reach the web interface the first
time around)
When I have a function whose arguments I have spec'ed with an fdef, and
that function is used in the construction of a lazy seq, it's easy to
stumble into situations where the arguments are not actually checked e
On Tuesday, September 5, 2017 at 2:03:36 PM UTC-7, Laverne Schrock wrote:
>
>
> On Tuesday, September 5, 2017 at 1:50:59 PM UTC-5, Russell Mull wrote:
>>
>> It's not really clear what you're trying to do, so it's hard to offer
>> further advice.
&g
On Monday, September 4, 2017 at 7:49:11 AM UTC-7, Laverne Schrock wrote:
>
> When I run (run* [q] (fresh [x] (== [x] ['z]) (== q x))), I get (z),
> which makes sense.
>
> When I run (run* [q] (fresh [x] (== q x))), I get (_0), which makes sense
> since I've placed no restriction on x.
>
> However
My team, which works on https://github.com/puppetlabs/puppetdb, is hiring a
software engineer. We mostly use Clojure.
https://puppet.com/company/careers/jobs?gh_jid=685071
(The page says Portland, but we're gladly open to anyone in US time zones)
- Russell
--
You received this message becaus
I've been hacking on a (currently partial) implementation of a spec
combinator I'm currently calling 'encoding-of'. It's pretty common to have
some kind of encoded version of a data structure kicking around, in json,
xml, or whatever, and it's handy to be able to describe it with spec.
That's w
Suppose you have a reactive process, something that receives a message,
processes it, updates its, state, and repeats. For example:
(go-loop [s :initial]
(case ( :processsing
:processing ->: :processing
:processing -> :stopping
:stopping -> (done)
This is pretty easy to write as a regular expre
On Friday, November 20, 2015 at 5:51:05 AM UTC-8, Henrik Larsson wrote:
>
> I have started to play around with ProbLog2 and find the concept of
> probabilistic logic programming to be super fun. When googeling miniKanren
> and probabilistic logic programming the following came up:
> https://githu
On Wednesday, August 5, 2015 at 4:58:42 AM UTC-7, Georgi Danov wrote:
>
> I wish I could do that in Clojure:
>
> (defn ^:transactional someFunction [...] ...)
>
How about
https://clojure.github.io/java.jdbc/#clojure.java.jdbc/with-db-transaction?
These kinds of scope macros are pretty common an
There are some potential applications for literate programming here. For
example, when doing an 'untangle' from your literate program source (to
extract the code), the typical way to allow changes to be merged back in is
to add comments with line number information. A more structured place to
p
Hi fellow Clojurists,
I've been working on a small miniKanren in Clojure. It started as a port
of https://github.com/jasonhemann/microKanren. But this one is interesting
because:
- It's a literate program, with far more description and examples than
actual code.
- Many names have been change
jurescript/blob/master/src/clj/cljs/test.clj
Russell
On Wed, Dec 24, 2014 at 10:13 AM, Yehonathan Sharvit
wrote:
> What about the 'are' macro?
>
>
>
> On Wed, Dec 24, 2014 at 7:38 PM, Russell Mull
> wrote:
>
>> Things that aren't in cljs.test:
>
Things that aren't in cljs.test:
- with-test
- run-tests can take a custom environment parameter. Things that
required rebinding a var in clj.test are configured with an entry in the
environment.
- :reporter, instead of rebinding the report function
- :testing-contexts i
I sometimes find that, when the formatting gets hairy, I need to either
refactor my code or use one of the pipeline macros.
(->> nums
(filter even?)
(reduce +))
- Russell
On Wednesday, December 11, 2013 11:24:16 AM UTC+9, Plinio Balduino wrote:
>
> Hi there
>
> What is the ideal way
> - available as a Standalone Product: Download, Unzip, Code!
>
This is huge! Maybe it seems like a trivial thing, but removing barriers to
getting started is fantastic.
Thank you Laurent, for your tireless and continuing work.
- Russell
--
--
You received this message because you are s
Generally, I'd go for a simple strategy (ahem) like this:
(defn make-handler [wibblie wooblie]
(fn [woosy]
))
But perhaps there's something about your case that I don't understand; I'm
not entirely sure where multimethods need to come into it, unless you need
to change which handler you'r
I have a profiles.clj that looks like this:
{:user
{:dependencies [[org.clojure/tools.nrepl "0.2.3"]]
:injections [(use 'clojure.repl)
(use 'clojure.pprint)
(use 'clojure.java.javadoc)]}}
And the repl behaves like this:
; nREPL 0.1.8-preview
user> *(doc list)*
This looks simple and useful, thanks!
Supposing I had a function that called this library, how could I go about
testing it easily? That is, the configuration file becomes implicitly an
input to the function, one that I'd like to be able to control from my
tests. Perhaps something like this coul
I find myself doing that a lot by hand, a tool to help would be very
useful. Some others that I've thought of are:
- change between (fn [x] ...) and #(...)
- pull sexp up to let, or introduce a new let (like introduce variable in
java et. al)
On Saturday, March 23, 2013 10:42:10 AM UTC+9, Alex
Hi Clojurians,
I'm relatively new to the language and am trying to get used to its idioms.
One thing I'm accustomed to doing in things like java and C# is checking
values for validity and then bailing out early if they don't make sense.
For example, without this idiom in java you might do:
O
19 matches
Mail list logo