Surprising st/instrument behavior with lazy seqs

2017-11-14 Thread Russell Mull
(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

Re: Question regarding core.logic

2017-09-06 Thread Russell Mull
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. >> >

Re: Question regarding core.logic

2017-09-05 Thread Russell Mull
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. > >

[Job] Software Engineer at Puppet

2017-05-11 Thread Russell Mull
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

'encoding-of' for spec

2017-01-04 Thread Russell Mull
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

clojure.spec for specifying sequences of states over time

2016-08-05 Thread Russell Mull
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

Re: Any chance of core.logic getting extended with probKanren?

2015-11-24 Thread Russell Mull
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: >

Re: Anotating functions for pre-processing

2015-08-05 Thread Russell Mull
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 and

Re: [ANN, GSoC] A Common Clojure Source Metadata Model

2015-05-21 Thread Russell Mull
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

micrologic - A tiny, literate implementation of miniKanren/core.logic

2015-01-08 Thread Russell Mull
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

Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2014-12-24 Thread Russell Mull
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

Re: [ClojureScript] Re: ANN: ClojureScript 0.0-2496, cljs.test - a clojure.test port

2014-12-24 Thread Russell Mull
/blob/master/src/clj/cljs/test.clj Russell On Wed, Dec 24, 2014 at 10:13 AM, Yehonathan Sharvit vie...@gmail.com wrote: What about the 'are' macro? On Wed, Dec 24, 2014 at 7:38 PM, Russell Mull russell.m...@gmail.com wrote: Things that aren't in cljs.test: - with-test - run

Re: Code layout

2013-12-10 Thread Russell Mull
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 to

Re: [ANN] Counterclockwise - Clojure plugin for Eclipse

2013-10-10 Thread Russell Mull
- 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

Re: (newbie-ish) Modelling question - multi methods?

2013-08-12 Thread Russell Mull
Generally, I'd go for a simple strategy (ahem) like this: (defn make-handler [wibblie wooblie] (fn [woosy] eloquent code here)) 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

lein injections across namespace changes

2013-07-09 Thread Russell Mull
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)*

Re: [ANN] conf-er 1.0.1

2013-05-05 Thread Russell Mull
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

Macro for bailout-style programming

2013-03-22 Thread Russell Mull
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:

Re: Refactoring tools

2013-03-22 Thread Russell Mull
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,