Re: Java Agent Based Modeling Systems and Clojure

2015-01-28 Thread Mars0i
Fred, This is an old thread, but did you end up using Repast, Mason, or another Java library with Clojure? I've been doing agent-based modeling in NetLogo and pure Clojure separately, but would be interested in exploring a more integrated approach. I have written a proof-of-concept NetLogo

Re: heaps in clojure vs SML

2015-01-31 Thread Mars0i
You also might want to use Criterium rather than *time *for accurate benchmarking*.* On Friday, January 30, 2015 at 6:54:52 AM UTC-6, Maris wrote: > > > yes, it helped :-) > > type hints make non-trivial difference > > thank you > > On Friday, 30

Re: heaps in clojure vs SML

2015-02-01 Thread Mars0i
present real world behavior, > > -- > Ashton > > On Saturday, January 31, 2015 at 11:39:05 PM UTC-7, Mars0i wrote: >> >> You also might want to use Criterium >> <https://github.com/hugoduncan/criterium> rather than *time *for >> accurate benchmarking*.* >

One more argument for cyclic dependencies

2015-05-18 Thread Mars0i
Sorry for the length of this post--I feel I have to spell out the details in order to head off irrelevant responses. I'm saving you the trouble of reading a long chain posts just focused on misunderstandings. For anything below, I'd be happy to find out that I'm wrong, confused, misguided, etc

Re: One more argument for cyclic dependencies

2015-05-18 Thread Mars0i
Sorry, the reference to an 85X speed difference was a typo. Should be 70X. -- 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 patien

Re: One more argument for cyclic dependencies

2015-05-19 Thread Mars0i
statement. Thanks everyone! I'll give further details and responses later. If anyone's interested, the code is here: https://github.com/mars0i/majure/tree/master/3opt2 An unoptimized version is here: https://github.com/mars0i/majure/tree/master/3plus And the Java version on whi

Re: One more argument for cyclic dependencies

2015-05-19 Thread Mars0i
Just to clarify a couple of things concerning my last post: Strictly speaking, the ClassNotFoundException is not the result of the order of namespaces in the :aot sequence in project.clj, but from the fact that if I start from a clean state with no compiled namespaces, then when the first names

Re: One more argument for cyclic dependencies

2015-05-19 Thread Mars0i
Tassilo, Jeroen, I used gen-class because Chas Emerick's type selection flowchart (https://github.com/cemerick/clojure-type-selection-flowchart) indicated that it was needed in order to allow named classes and interface implementations, and that's what I thought I needed. However, perhaps that

Re: One more argument for cyclic dependencies

2015-05-19 Thread Mars0i
Gary wrote: * I was under the impression that Clojure only restricted cyclic dependencies between ns forms. Have you tried calling import/require/gen-class directly? Not much. I did try one trick that involved switching namespaces inside a file, but it didn't work. I can try other things. --

Re: One more argument for cyclic dependencies

2015-05-20 Thread Mars0i
tations. Things become much simpler when you accept this. You can > even have a single file that defines all the protocols you might need, and > each of your classes can implement one or more protocols, while defining > methods or fields that use other protocols with no circularity need

Why isn't definterface in the cheatsheet?

2015-05-20 Thread Mars0i
Is there any reason why definterface is missing from the Clojure 1.6 documentation cheatsheets? The same is true of the "other versions with tooltips". Nothing I've read suggests that definterface is deprecated. -- You received this message because you are subscribed to the Google Groups "Clo

Re: Why isn't definterface in the cheatsheet?

2015-05-20 Thread Mars0i
> namespace-munge > numerator > primitives-classnames > print-ctor > print-dup > print-method > print-simple > proxy-call-with-super > proxy-name > read > read-string > reduced > reduced? > refer-clojure > replicate > sequence > special-symbol? >

Re: One more argument for cyclic dependencies

2015-05-22 Thread Mars0i
I've now tried implementing the Student class (see previous posts) using reify, deftype, defrecord, and proxy, in each case specifying that they implement an interface (SteppableStudent) that extends the MASON Java interface Steppable. (The extended interface adds one method.) The reify and de

Re: One more argument for cyclic dependencies

2015-05-22 Thread Mars0i
ce for any reason, it's at https://github.com/mars0i/majure. The latest version at this moment is in the directory *3opt8*. The version referenced in my last post was in *3opt7*. *0plus* contains a pure Java version. I may reorganize the directories in a few weeks.) Thanks for every

Re: One more argument for cyclic dependencies

2015-05-23 Thread Mars0i
Wow--thanks very much for looking at the code, Tassilo. Ah, yeah, the problem is that you still need to extend the existing > SimState class and thus you need gen-class. In case SimState is a > non-abstract class and also comes with an interface ISimState, you could > probably get rid of gen-c

Interop: mutability vs. inheritance

2015-05-27 Thread Mars0i
Is the following correct? The only way to define *multiple* mutable instance variables/fields for a class visible in Java is by using deftype with :volatile-mutable or :unsynchronized-mutable. The only way to inherit from a concrete Java class is by using gen-class or proxy. gen-class allows a

Re: Interop: mutability vs. inheritance

2015-05-27 Thread Mars0i
in Clojure itself.) -Marshall On Wednesday, May 27, 2015 at 1:17:15 PM UTC-5, Marshall Bockrath-Vandegrift wrote: > > Mars0i > writes: > > > I believe these statements are correct, but gen-class is complex and > > deftype use has some nuances, so I want to make sure I haven

Re: Interop: mutability vs. inheritance

2015-05-28 Thread Mars0i
> >I think that's correct (with the exception you already mention yourself: > >you can use a :state structure containing multiple values). > > OK. If you care mostly about performance, maybe using an array as :state > will do. That's always mutable and access is really fast. > Oh, nice id

Re: non-incanter statistical tests?

2015-06-01 Thread Mars0i
One option would be to call R from Clojure. I haven't tried this, and I don't know how well it would fit your needs. Rincanter is supposed to allow this. Presumably it would bypass the Incanter functions that you don't wa

When should defrecord be slower than deftype?

2015-06-02 Thread Mars0i
I have an application using Java interop, in which I can define a class using either deftype or defrecord. It has one field, containing an atom containing a double, and a few methods. One of the methods is specified by an interface defined in Java, and that method is called from Java. This m

Re: When should defrecord be slower than deftype?

2015-06-02 Thread Mars0i
Thanks Timothy. I had been testing the simple defrecord and deftype definitions in the repl, but tried it with 'java -server' and still got roughly equal times. I was testing the full program with 'lein run', but just to be sure tried making a jar and running it with 'java -server'. The deft

Re: When should defrecord be slower than deftype?

2015-06-02 Thread Mars0i
ould be doing a bit more work there than deftype, which gets the default > equals/hashcode. > > Hope that helps! > steven > > > [1] - https://github.com/gtrak/no.disassemble/ > > On Tuesday, June 2, 2015 at 1:08:13 PM UTC-4, Mars0i wrote: >> >> I have an applicati

Re: When should defrecord be slower than deftype?

2015-06-02 Thread Mars0i
Thanks Steven, Andy. I feel much better knowing now *why *deftype and defrecord have different performance. I felt that I should prefer defrecord because it's the default, and just in case I needed its extra features. Now I can feel good about using deftype as long as I'm clear about what the

Re: When should defrecord be slower than deftype?

2015-06-03 Thread Mars0i
On Tuesday, June 2, 2015 at 11:16:49 PM UTC-5, Steven Yi wrote: > > As a side note, as an experiment I just tried overriding Object.equals > and Object.hashCode with a defrecord, and I got a compiler error: > > CompilerException java.lang.ClassFormatError: Duplicate method > name&signature in

defrecord, equality, hashing, and performance

2015-06-11 Thread Mars0i
I think that the following is all correct, but I could be wrong about something. The datatypes page at clojure.org says: "defrecord provides ... value-based equality and hashCode", while deftype does not. So (defrecord Rec [x]) (= (Rec. 42) (Rec. 42)) ;=> true b

Re: defrecord, equality, hashing, and performance

2015-06-11 Thread Mars0i
On Thursday, June 11, 2015 at 2:19:56 PM UTC-5, Andy Fingerhut wrote: > > You can override hashCode and/or hasheq methods in deftype. > I've been unable to do it. Is there something special needed to allow this to work? user=> (defrecord Foo [x] Object (hashCode [this] 42)) CompilerException

Re: defrecord, equality, hashing, and performance

2015-06-11 Thread Mars0i
On Thursday, June 11, 2015 at 2:12:12 PM UTC-5, puzzler wrote: > > Zach Tellman's potemkin library includes several useful ways to tweak > deftypes and defrecords. I wish Clojure itself provided more ways to do > this, but in the meantime, potemkin is the best way to create something > custom,

Re: defrecord, equality, hashing, and performance

2015-06-12 Thread Mars0i
On Friday, June 12, 2015 at 1:34:20 AM UTC-5, Andy Fingerhut wrote: > > deftype allows you to override hashCode and/or hasheq (I believe > defaulting to identity-based implementations from java.lang.Object). > defrecord does not. > Sorry--I misread your earlier statement about this. That's goo

Re: defrecord, equality, hashing, and performance

2015-06-12 Thread Mars0i
puzzler, thanks for the explanation about how you built on potemkin's map options. Probably not useful for my current application--easier to just work around deftype's limitations on an ad-hoc basis. But that takes some of the fun (convenience) out of Clojure (and unnecessarily, I feel, I gue

Re: defrecord, equality, hashing, and performance

2015-06-12 Thread Mars0i
Oh, yes, and that's an interesting idea to wrap a record in an atom or delay. For my present uses that would be more trouble than it's worth, but it's something worth keeping in mind for other situations. On Friday, June 12, 2015 at 10:41:57 AM UTC-5, Mars0i wrote: > > pu

Re: [ANN] Neanderthal, a fast, native matrix and linear algebra library for Clojure released + call for help

2015-06-18 Thread Mars0i
There are plenty of votes for a core.matrix wrapper to this great project, but I'll add one point. I came to Clojure from Common Lisp. I had a neural network application in Common Lisp that didn't use matrices, and I decided I needed to rewrite it from scratch using matrices. Common Lisp ha

Re: [ANN] Neanderthal, a fast, native matrix and linear algebra library for Clojure released + call for help

2015-06-19 Thread Mars0i
Neanderthal seems very cool. You've clearly put a *lot* of work into this. I for one am thankful that you've made available what is a very nice tool, as far as I can see. I don't think there's necessarily a conflict concerning core.matrix, though. You may not want to write a core.matrix wrap

Re: [ANN] Neanderthal, a fast, native matrix and linear algebra library for Clojure released + call for help

2015-06-20 Thread Mars0i
Dragan, this just occurred to me--a small comment about the slow speed that I reported from clatrix, which you mentioned earlier. I'm not sure whether the slow speed I experienced on 500x500 matrices itself provides eviden

Re: [ANN] Neanderthal, a fast, native matrix and linear algebra library for Clojure released + call for help

2015-06-22 Thread Mars0i
It may be that there's agreement on everything that matters. Dragan, you've said that you wouldn't mind others integrating Neanderthal into core.matrix, but that you don't want to do that. That you are willing to work with others on this is probably all that's needed. People may have questio

Once more: against single-pass compilation ... ?

2015-07-11 Thread Mars0i
My understanding is that all of the drawbacks mentioned below are a consequence of Clojure using a single-pass compiler. Feel free to correct my misunderstandings, which no doubt exist. 0. Provisos: I don't want Clojure to include every feature that anyone wants. I don't even want it to incl

Re: Once more: against single-pass compilation ... ?

2015-07-11 Thread Mars0i
using the > constructor functions: > > (defprotocol XP (make-Y [this])) > (defprotocol YP (make-X [this])) > (declare ->Y) > (defrecord X [x] XP (make-Y [this] (->Y x))) > (defrecord Y [y] YP (make-X [this] (->X y))) > > - James > > > > On

Re: [ANN] Replete ClojureScript REPL iOS app available

2015-07-20 Thread Mars0i
Thanks very much for this. (Just installed 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

Re: [ANN] Replete ClojureScript REPL iOS app available

2015-07-22 Thread Mars0i
Wow. That will be great. On Tuesday, July 21, 2015 at 1:01:36 PM UTC-5, Mike Fikes wrote: > > Yes, that's part of what I have in mind, in addition to downloading JARs > from, say, Clojars. > > On Jul 21, 2015, at 1:55 PM, Fergal Byrne > wrote: > > Really nice, thanks Mike for such a clean app.

Re: Presentation about Clojure

2014-08-22 Thread Mars0i
(Caveat: I have never seen *any* Clojure presentations, even on Youtube.) (1) Others may disagree, but ... although I love Lisps, think that purely functional programming is cool, and have come to see that there are situations in which FP is *great*, I am not someone who thinks that FP is alwa

Re: Presentation about Clojure

2014-08-23 Thread Mars0i
On Saturday, August 23, 2014 12:04:51 PM UTC-5, Cecil Westerhof wrote: > > 2014-08-23 7:06 GMT+02:00 Mars0i >: > >> (1) Others may disagree, but ... although I love Lisps, think that >> purely functional programming is cool, and have come to see that there are >

Re: CLISP books any good to learn Clojure

2014-08-24 Thread Mars0i
Are people using "Clisp" to refer to Common Lisp these days? I always spell the whole thing out, or use "CL" when context makes it sufficiently clear. I think of "CLISP" as the name for one particular CL implementation. On Sunday, August 24, 2014 9:43:41 AM UTC-5, Ashton Kemerling wrote: > > J

Re: CLISP books any good to learn Clojure

2014-08-24 Thread Mars0i
On Sunday, August 24, 2014 9:43:41 AM UTC-5, Ashton Kemerling wrote: > > Just remember that Clisp > > 1) not entirely immutable > 2) not a hosted language > > I worked in CL professionally for a year (SBCL in particular) and while > clojure is closer to SBCL than it is to python, it is a differen

Re: GSoC: Congratulations Aleksandr and Prasant!

2014-08-25 Thread Mars0i
Thank you! to Prasant and Aleksandr. -- 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

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-08 Thread Mars0i
Thanks for the survey! I have a couple of suggestions/questions: For domains, there are no categories for scientific or other research applications. For example, I mainly use Clojure for writing agent-based models for academic research. Would a set of categories in this area be usedful? The

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-10 Thread Mars0i
I'd be interested in a site that lists examples of academic projects in Clojure. (I know of a few Clojure projects in areas of interest to me.) But only a little bit interested--not enough for me to create such a site. -- You received this message because you are subscribed to the Google Grou

Re: {ANN} defun: A beautiful macro to define clojure functions with pattern match.

2014-10-10 Thread Mars0i
I think it *is* a beautiful macro. On Sep 14, 2014, at 7:45 AM, adrian...@mail.yu.edu wrote: > > Friendly advice: when you describe anything you create with adjectives > like beautiful, it comes off as unnecessarily arrogant to native English > speakers. > > Adrian > > On Sunday, September 14,

Re: Schrodinger's cat in clojure?

2014-10-10 Thread Mars0i
On Saturday, September 13, 2014 9:01:53 AM UTC-5, Lee wrote: > > So now one of my first steps when I'm faced with a confusing bug is to > stamp out all of the laziness except where I'm really doing things lazily > on purpose, for a good reason. I've also come to think that the > pervasiveness

Re: Schrodinger's cat in clojure?

2014-10-10 Thread Mars0i
On Friday, October 10, 2014 5:20:30 PM UTC-5, Mars0i wrote: > > Maybe an ideal world would be one in which there was a global setting to > turn laziness on and off. When you want it, have it, and know your risks. > After looking at the source for some of the lazy functions,

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Mars0i
s not really new. > You can currently infer as well that `map` `filter` `concat` e.t.c are > lazy. While `mapv` or `filterv` are not. > > > On 11 Oct 2014, at 00:28, Mars0i > > wrote: > > > > On Friday, October 10, 2014 5:20:30 PM UTC-5, Mars0i wrote: >>

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Mars0i
t; nature of a queue or a channel. > If you don’t want the properties of a seq, then use another data > structure, like a vector. > > > On 11 Oct 2014, at 18:14, Mars0i > > wrote: > > Thanks Jan-Paul. That's helpful. I wonder whether, if all lazy functions > were r

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Mars0i
ike disabling the FIFO > nature of a queue or a channel. > If you don’t want the properties of a seq, then use another data > structure, like a vector. > > > On 11 Oct 2014, at 18:14, Mars0i > > wrote: > > Thanks Jan-Paul. That's helpful. I wonder whether, if all

Re: Schrodinger's cat in clojure?

2014-10-11 Thread Mars0i
Jan-Paul, Laurent- That's great. Thanks. -- 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 unsub

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-13 Thread Mars0i
On Monday, October 13, 2014 1:50:13 PM UTC-5, Zack Maril wrote: > > Next year, I would appreciate questions that measure the demographics of > Clojure users be included. Out of the hundreds of people I've heard and > seen talking about using Clojure, the vast majority of them have been white > m

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-15 Thread Mars0i
I don't really get it. I don't see a legitimate reason why anyone would refuse to participate in the survey because it included demographic questions. The survey is anonymous. The combination of questions is not such that it would be at all plausible that anyone could be identified by their

Re: ANN: State of Clojure 2014 Survey - please contribute!!

2014-10-15 Thread Mars0i
that, don't object to it, and am open to supporting it. On Wednesday, October 15, 2014 7:22:56 PM UTC-5, Mars0i wrote: > > I don't really get it. I don't see a legitimate reason why anyone would > refuse to participate in the survey because it included demographic

Re: Modelling in Clojure

2014-10-17 Thread Mars0i
On Thursday, October 16, 2014 11:53:42 PM UTC-5, puzzler wrote: > > In Clojure, non-computed fields are usually accessed directly by keyword, > whereas computed fields require an actual API. This difference in access > style complicates things if you want to change which things are stored > ver

Re: Leiningen setup for modifying a library the project is depending on

2014-10-27 Thread Mars0i
I've used the checkouts method, and found it to be a useful solution when I was actively modifying the library. When I'm not modifying the library very often, I've had fewer glitches by simply using 'lein install' from the library project directory. That installs the latest version of the libr

Transducers: Why left to right rather than right to left?

2014-10-30 Thread Mars0i
Caveat: I am still feeling around in the dark in my understanding of transducers. What I write below may just convey how clueless I am. (Meta-caveat: I'm probably spitting into the wind. I should no doubt use my time more wisely.) Normal function composition is done starting from the right.

Re: Transducers: Why left to right rather than right to left?

2014-10-30 Thread Mars0i
.com/watch?v=6mTbuzafcII . > > This part tackles your questions on ordering > https://www.youtube.com/watch?v=6mTbuzafcII#t=1531 . > > > > 2014-10-30 15:44 GMT+00:00 Mars0i >: > >> Caveat: I am still feeling around in the dark in my understanding of >> trans

Re: Transducers: Why left to right rather than right to left?

2014-10-30 Thread Mars0i
Sorry--I just realized that you gave me a link to the exact place in the video in which Rich H. talks about order. Thanks! That is *very* helpful. On Thursday, October 30, 2014 11:31:29 AM UTC-5, Mars0i wrote: > > Thanks Las. That's a verty helpful suggestion, though for me perso

Re: Transducers: Why left to right rather than right to left?

2014-10-30 Thread Mars0i
Jonas, Atamert, thank you. Very helpful illustrations and comments. Jozef: A transcribed talk with slides! Excellent. Las, I might actually break down and watch the talk. Or parts of it, and read the rest. Thanks everyone. -- You received this message because you are subscribed to the Google

Re: Deterministic Randomness in Functional Clojure

2014-10-30 Thread Mars0i
Isaac, I confess that I don't have any deep insights to offer about these architectural questions for your particular situation, but here are a few remarks that might be helpful for peripheral issues. In Clojure 1.6.0, at least, clojure.core/rand uses java.util.Random() (seeded by the system ti

Re: Caching an anon function

2014-10-31 Thread Mars0i
Phil, I think your post accidentally ended up in the wrong place. I believe you intended to create a new thread. On Friday, October 31, 2014 4:55:39 AM UTC-5, Phillip Lord wrote: > > > > I want to pass a java method call to a function. So instead of this: > ... > -- You received this message

Re: Deterministic Randomness in Functional Clojure

2014-11-01 Thread Mars0i
On Friday, October 31, 2014 11:19:19 PM UTC-5, Isaac Karth wrote: > > Looks like if I want to use libraries like clojure.data.generators or > bigml.sampling I'd need to amend the random generators to replace calls to > the Mersenne Twister function or (def ^:dynamic *rnd* (java.util.Random. >

Re: ANN: Sparse matrix support for Clojure with vectorz-clj 0.28.0

2014-12-28 Thread Mars0i
This is cool. Kind of makes me wish my sparse matrices were larger than 300x300. I'll experiment with it anyway. On Saturday, December 27, 2014 4:56:55 AM UTC-5, Mike Anderson wrote: > > Here is a little belated Christmas present for Clojure data aficionados: > > ;; setup > (use 'clojure.core.m

Re: changing default clojure.pprint/*print-right-margin*

2015-01-06 Thread Mars0i
I'm not sure whether this counts as an answer. I put this definition in a file that my leiningen project loads by default: (defn set-pprint-width "Sets width for pretty-printing with pprint and pp." [cols] (alter-var-root #'clojure.pprint/*print-right-margin* (constantly cols))

Re: clojure.spec

2016-05-25 Thread Mars0i
I'm very happy about clojure.spec. I think. (!) Two suggestions for the documentation page. Just my two cents. First, it would be helpful to begin with a description of what clojure.spec does and how it will be used, and one or two brief examples right at the beginning--ideally before the fir

Re: clojure.spec

2016-05-25 Thread Mars0i
Thanks again, in any event. On Wednesday, May 25, 2016 at 11:14:59 AM UTC-5, Mars0i wrote: > > I'm very happy about clojure.spec. I think. (!) > > Two suggestions for the documentation page. Just my two cents. > > First, it would be helpful to begin with a description o

Re: ANN: ClojureScript 1.9.89 - cljs.spec & :preloads

2016-07-20 Thread mars0i
This version isn't supposed to have implemented spec/double-in yet, right? I get "Use of undeclared Var cljs.spec/double-in". Sorry to ask--I don't know my way around JIRA well, and searching for "double-in" brings up a lot of irrelevant tickets. Thanks much. -- You received this message be

Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Mars0i
clojure.spec/double-in defines a spec that tests whether a double is greater than or equal to a minimum value and less than or equal to a maximum value. This is useful for many purposes, but sometimes you need to test whether a double is greater than a minimum or less than a maximum. There ar

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Mars0i
On Wednesday, July 20, 2016 at 4:32:40 PM UTC-5, Alex Miller wrote: > > You can file a jira if you like, I'm not sure Rich's thoughts on this. > I understand. Thanks--will do. > Also, keep in mind that you can also compose preds and get this with > slightly more effort now: > > (s/and (s/dou

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-20 Thread Mars0i
On Wednesday, July 20, 2016 at 10:02:17 PM UTC-5, Alex Miller wrote: > > On Wednesday, July 20, 2016 at 9:41:59 PM UTC-5, Mars0i wrote: >> >> On Wednesday, July 20, 2016 at 4:32:40 PM UTC-5, Alex Miller wrote: >>> >>> You can file a jira if you like,

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Mars0i
On Thursday, July 21, 2016 at 9:51:02 AM UTC-5, Alex Miller wrote: > > You can already get open intervals by just omitting :min or :max. > I think my terminology may have created some confusion; I probably shouldn't have used open/closed. I meant "open interval" in the sense that an open interv

Re: Enhance spec/double-in to handle open and half-open intervals?

2016-07-21 Thread Mars0i
On Thursday, July 21, 2016 at 8:50:21 AM UTC-5, miner wrote: > > With a little help from Java, you can make equivalent open intervals for > the desired bounds. For example, > > Also, you can use java.lang.Math/nextUp and nextAfter to get adjacent > doubles for your bounds. > > (java.lang.Math/

meaning of spec/and ?

2016-07-21 Thread Mars0i
With Clojure 1.9.0-alpha10: *user=> (s/def ::interval-with-cloj-and #(and (> % 0.0) (< % 1.0)))user=> (s/def ::interval-with-spec-and #(s/and (> % 0.0) (< % 1.0)))user=> (s/valid? ::interval-with-cloj-and 1.0)false*That's what I expected. *user=> (s/valid? ::interval-with-spec-and 1.0

Re: meaning of spec/and ?

2016-07-21 Thread Mars0i
nse, a predicate function is the simplest form of a > spec. However, you need a special way of combining multiple specs, not > just the plain logical `and` combination. So we have `s/and` to do the job. > > > > On Jul 21, 2016, at 1:23 PM, Mars0i > > wrote: > >

Re: meaning of spec/and ?

2016-07-21 Thread Mars0i
On Thursday, July 21, 2016 at 5:34:37 PM UTC-5, adrian...@mail.yu.edu wrote: > > Just for future reference this is a mailing list and not a traditional > forum, so after you post something here it will email everyone subscribed. > Thanks Adrian. I actually didn't realize that. -- You receive

Future of spec/explain-data, spec/and, etc.

2016-07-24 Thread Mars0i
spec/explain-data seems very important. It allows programmatic responses to spec failures. Maybe explain-data's behavior hasn't yet stabilized, though? The structure of the return value has changed between 1.9.0-alpha7 to the current 1.9.0-alpha10, the docstring is a bit vague, and the Spec

Re: Future of spec/explain-data, spec/and, etc.

2016-07-25 Thread Mars0i
a ticket about the explain-data docstring. On Monday, July 25, 2016 at 12:34:23 AM UTC-5, Alex Miller wrote: > > > > On Sunday, July 24, 2016 at 10:40:41 PM UTC-5, Mars0i wrote: >> >> spec/explain-data seems very important. It allows programmatic responses >> to spec

Re: Future of spec/explain-data, spec/and, etc.

2016-07-25 Thread Mars0i
On Monday, July 25, 2016 at 10:56:09 AM UTC-5, Mars0i wrote: > > just noticed this morning that :path is explained in "clojure.spec - > Rationale and Overview". > There's also material about :path in your Spec Guide, but I had not fully understood it. I get it now--

Re: ANN: Klipse for Kids

2016-08-02 Thread Mars0i
This looks very, very nice. The instant feedback is especially helpful. (You are probably already working on is capturing errors to make them less daunting.) Klipse reminded me of Carin Meier's beautiful and poignant Hello World for the Next Generation.

Re: ANN: Klipse for Kids

2016-08-03 Thread Mars0i
On Wednesday, August 3, 2016 at 6:00:43 AM UTC-5, Yehonathan Sharvit wrote: > > Mars0i, as I see it interactivity is the key for effective learning - both > for kids and adults. > > This is the whole point of Klipse - https://github.com/viebel/klipse. > Ah, very nice. I know a

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-23 Thread Mars0i
I'm not anywhere near as deep into spec as would be needed to fully understand this thread, but I will say that I agree with those who object to the guitar analogy. That argument would work just as well as a response to someone who complained about the difficulty of C++, or assembler, or APL.

Re: Clojure version and quil

2016-09-07 Thread Mars0i
The general principle is that the Clojure version that you get when you run 'lein repl' will be the one specified in the project.clj file in the directory you're in when you run 'lein repl'. (Nikita's link illustrates how the Clojure version is specified in project.clj.) When you run 'clojure

Re: map/filter/remove etc. change underlying structure

2016-09-09 Thread Mars0i
On Friday, September 9, 2016 at 6:36:17 AM UTC-5, puzzler wrote: > > ... > You can use `into` to "pour" the sequence into the collection of your > choice. If you're using `into`, then most of these sequence functions > support transducers to avoid allocation of intermediate sequences, > provi

Re: [CfP] :clojureD 2017

2016-09-15 Thread Mars0i
Glad that this is happening. You might want to add the date to the CFP and Schedule pages. I only found it on the Press page. On Wednesday, September 14, 2016 at 9:38:09 AM UTC-5, Stefan Kamphausen wrote: > > Dear Clojure-community, > > > Please let me bring the current call for proposals for t

Re: [CfP] :clojureD 2017

2016-09-16 Thread Mars0i
On Friday, September 16, 2016 at 8:14:49 AM UTC-5, Stefan Kamphausen wrote: > > Hi, > > On Friday, September 16, 2016 at 6:16:14 AM UTC+2, Mars0i wrote: >> >> Glad that this is happening. >> You might want to add the date to the CFP and Schedule pages. I only

parallel sequence side-effect processor

2016-09-22 Thread Mars0i
This is almost the same as an issue I raised in this group over a year and a half ago, here . I suggested that Clojure should include function with map's syntax but that was executed only for s

Re: parallel sequence side-effect processor

2016-09-23 Thread Mars0i
On Friday, September 23, 2016 at 1:47:45 AM UTC-5, Francis Avila wrote: > > It's not crystal clear to me what you are after, either from this post or > the one you link to. I think you want a map that does not produce > intermediate collections and accepts multiple colls as input at a time? Ye

Re: parallel sequence side-effect processor

2016-09-23 Thread Mars0i
On Friday, September 23, 2016 at 11:11:07 AM UTC-5, Alan Thompson wrote: > > ​Huh. I was also unaware of the run! function.​ > > I suppose you could always write it like this: > > (def x (vec (range 3))) > (def y (vec (reverse x))) > > (run! > (fn [[x y]] (println x y)) > > (map vector x y)) >

Re: parallel sequence side-effect processor

2016-09-23 Thread Mars0i
Thanks everyone--I'm very much appreciating the discussion, though I'm not sure I follow every point. Dragan, thank you very much for suggesting (and writing) foldmap. Very nice. I certainly don't mind using a library, though I still think there ought to be something like what I've describe

Re: parallel sequence side-effect processor

2016-09-23 Thread Mars0i
Thanks very much Francis. So it sounds as if, if my data would already be in a vector, list or sequence (maybe a lazy sequence), doseq will process that structure as fast as possible, but there are other structures that might have faster internal reduce operations. -- You received this mess

Re: parallel sequence side-effect processor

2016-09-25 Thread Mars0i
Thanks everyone. There's a lot here--I'm still digesting it all. It's clear that a lot may depend on the underlying collections, and that, among other things, foldmap is worth considering for benchmarking in performance-critical code, as is mapping a vector across multiple sequences to combin

No transducer variant of partition?

2016-10-11 Thread Mars0i
partition-all has a transducer variant, but partition doesn't. Just curious why. The difference between the non-transducer functionalities is that, for example, (partition-all n coll) will return shorter-than-n stub sequences at the end of the main output sequence if the (count coll) isn't div

Re: No transducer variant of partition?

2016-10-12 Thread Mars0i
Thanks Christophe. Very nice. I may use partition, or something else as the need arises. -- 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 -

Re: Should I switch to Clojure after 3 years of learning another full stack ?

2016-10-12 Thread Mars0i
Others have meatier, more detailed answers. Here's one more factor that might matter: Clojure makes me happy. I'm happier programming in Clojure than in other languages that are also very suitable for my projects. I enjoy myself more, and it's easier. I even prefer to use Clojure when I co

Re: [ANN] clj-xchart – A charting/plotting library for Clojure

2016-10-16 Thread Mars0i
Looks very nice! Thanks Jean Niklas. I've been using Incanter for charts, which has been fine so far for my needs, but clj-xchart looks like it will make it easier to make nicer charts, and it would avoid loading much of Incanter when you don't need some of the other things Incanter provides.

Re: [ANN] clj-xchart – A charting/plotting library for Clojure

2016-10-17 Thread Mars0i
On Monday, October 17, 2016 at 3:37:51 PM UTC-5, Jean Niklas L'orange wrote: > > Hi Marshall, > > On 17 October 2016 at 07:54, Mars0i > > wrote: > >> Looks very nice! Thanks Jean Niklas. I've been using Incanter for >> charts, which has been fine so

Re: comp and partial vs ->>

2016-10-28 Thread Mars0i
On Thursday, October 27, 2016 at 11:39:27 AM UTC-5, Alan Thompson wrote: > > I almost never use either the `comp` or the `partial` functions. I think > it is clearer to either compose the functions like Gary showed, or to use a > threading macro (my favorite is the `it->` macro from the Tupelo l

Re: any? in clojure 1.9.0 alpha

2016-11-06 Thread Mars0i
On Sunday, November 6, 2016 at 9:54:19 PM UTC-6, Alan Thompson wrote: > > There was quite a discussion of this topic back in July if you'd like to > review it: https://goo.gl/Azy8Nf > > The semantic mismatch is unfortunate. > Alan > It's not just a mismatch with not-any?, though. "any?" makes

  1   2   3   4   >