Re: Modelling in Clojure

2014-10-22 Thread Daniel
To their a wrench in the works, "keywords are functions that look themselves up in a map". Therefore, a traditional map is just as much api as data, and map values can be functions too, blurring the lines between static and computed values. So, you know, have fun with that. -- You received th

Emacs Utilities

2014-10-22 Thread Glenn
Hi, I’ve written a collection of Emacs Utilities which includes a project manager, a persistent file history list, a persistent position history list, a popup menu listing of a file’s definitions. Clojure documentation support, Common Lisp documentation support and a window management utilit

Question about test.check, and knossos

2014-10-22 Thread Andy Chambers
Hi All, Lately I've been exploring the world introduced to me by watching the John Hughes' quickcheck video from clojure west. Awesome stuff! Eventually I found the "testing for fun and profit"[1] paper which left me wanting to test my apps using a model based system like the paper describes. I

Re: Modelling in Clojure

2014-10-22 Thread Ambrose Bonnaire-Sergeant
There is no point considering workarounds (but thanks either way). Every line of Clojure code near a call to `seq` has local assumptions about an immutable data structure. The implications run deep. If this issue is going to be tackled, ArraySeq needs to be made immutable. I'll continue this disc

Re: Modelling in Clojure

2014-10-22 Thread Fluid Dynamics
On Wednesday, October 22, 2014 4:51:23 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > I missed this in the sequence spec : When > seq is used on native Java arrays, changes to the underlying array will be > reflected in the seq - you must copy the source array to ge

Re: [ANN] A guide to setup test driven workflow for Clojure

2014-10-22 Thread tao.zhou2009
(defun cider-repl-command (cmd) "Execute commands on the cider repl" (cider-switch-to-repl-buffer) (goto-char (point-max)) (insert cmd) (cider-repl-return) (cider-switch-to-last-clojure-buffer)) (defun cider-repl-reset () "Assumes reloaded + tools.namespace is used to reload everything" (intera

"Interacting with Java", new Clojure for the Brave and True chapter

2014-10-22 Thread Daniel Higginbotham
I've written a chapter on interacting with java, http://www.braveclojure.com/java/. It a) gives an overview of what the JVM is, b) explains how to interact with Java classes and objects, and c) covers commonly-used Java classes. I'd love to hear any feedback - what works well, what's confusing

Re: Modelling in Clojure

2014-10-22 Thread Ambrose Bonnaire-Sergeant
I missed this in the sequence spec : When seq is used on native Java arrays, changes to the underlying array will be reflected in the seq - you must copy the source array to get full immutability. I understand the rationale, still quite shocking. Ambrose On Wed, Oct

[ANN] Clojure-powered Dance Double Bill (London, November 8th)

2014-10-22 Thread nick rothwell
Blog entry with details here: http://www.cassiel.com/2014/10/18/networked-bodies-watermans/ One of the pieces is audio-responsive with HD visuals in Quil; the other is running in Field (Java->Jython->Clojure), live coded by myself on stage in London and Kate (the choreographer) in Light Table,

Re: Modelling in Clojure

2014-10-22 Thread Jozef Wagner
Not every ISeq is lazy. In this case the seq is not lazy but is backed by a mutable array, thus the mentioned behavior. Jozef On Wednesday, October 22, 2014 6:41:34 PM UTC+2, Fluid Dynamics wrote: > > On Wednesday, October 22, 2014 12:10:30 PM UTC-4, Ambrose > Bonnaire-Sergeant wrote: >> >> On

Re: Modelling in Clojure

2014-10-22 Thread Fluid Dynamics
On Wednesday, October 22, 2014 12:10:30 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > On Wed, Oct 22, 2014 at 9:32 AM, Fluid Dynamics > wrote: >> >> and is guaranteed to always produce the same value for the same field. >>> >> >> Nope: >> >> => (def foo (int-array [1 2 2 5 9 3])) >> #'user/foo >

Re: Modelling in Clojure

2014-10-22 Thread Ambrose Bonnaire-Sergeant
On Wed, Oct 22, 2014 at 9:32 AM, Fluid Dynamics wrote: > > and is guaranteed to always produce the same value for the same field. >> > > Nope: > > => (def foo (int-array [1 2 2 5 9 3])) > #'user/foo > => (def bar (seq foo)) > #'user/bar > => bar > (1 2 2 5 9 3) > => (aset foo 3 3) > 3 > => bar > (

Re: Modelling in Clojure

2014-10-22 Thread Stephen Gilardi
> Clojure's laziness is restricted to seqs > and is guaranteed to always produce the same value for the same field. > > Nope: > > => (def foo (int-array [1 2 2 5 9 3])) > #'user/foo > => (def bar (seq foo)) > #'user/bar > => bar > (1 2 2 5 9 3) > => (aset foo 3 3) > 3 > => bar > (1 2 2 3 9 3) T

Re: midje test : Can I only run 1 test

2014-10-22 Thread Tobias Kortkamp
Yes, you can tag your facts, and then only run the facts with a specific tag. See https://github.com/marick/Midje/wiki/Lein-midje under the :filter section. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure

Re: Modelling in Clojure

2014-10-22 Thread James Reeves
On 22 October 2014 14:32, Fluid Dynamics wrote: > On Wednesday, October 22, 2014 6:09:04 AM UTC-4, James Reeves wrote: >> >> >> No, I mean unrestricted uniform access. >> >> Clojure's laziness is restricted to seqs >> > > Not quite; there's also delay and force, and it's possible to use these to

Re: Modelling in Clojure

2014-10-22 Thread Fluid Dynamics
On Wednesday, October 22, 2014 6:09:04 AM UTC-4, James Reeves wrote: > > On 22 October 2014 10:01, Phillip Lord > wrote: > >> James Reeves > writes: >> > >> >> Regardless, we have a nice example in Clojure, where we not >> >> distinguishing between data and computation allows us to do something >>

Re: Modelling in Clojure

2014-10-22 Thread James Reeves
On 22 October 2014 10:01, Phillip Lord wrote: > James Reeves writes: > > > >> Regardless, we have a nice example in Clojure, where we not > >> distinguishing between data and computation allows us to do something > >> nice. > > > > Yes... I agree it allows us to do something, but let's agree to

Re: Modelling in Clojure

2014-10-22 Thread James Reeves
On 22 October 2014 08:24, Linus Ericsson wrote: > 2014-10-22 6:25 GMT+02:00 Jason Wolfe : > >> >> Maybe this post from would be of use? >> >> >> https://github.com/Prismatic/eng-practices/blob/master/clojure/20130926-data-representation.md >> > > the summary is good, but I'm missing the more effi

Re: Modelling in Clojure

2014-10-22 Thread Phillip Lord
James Reeves writes: > > Sure, laziness feels like a subset of UAP. > > > Regardless, we have a nice example in Clojure, where we not >> distinguishing between data and computation allows us to do something >> nice. >> > > Yes... I agree it allows us to do something, but let's agree to disagree on

Re: Modelling in Clojure

2014-10-22 Thread Linus Ericsson
Jason, the summary is good, but I'm missing the more efficient data structure array-map that probably wastes less space than the hash-map for the same size of object. [1] Also Zach Tellman has made some effort with clj-tuple which however use indexes, not keys. [2] [1] http://clojuredocs.org/clo