Re: Any way to replace function body?

2019-01-20 Thread Mars0i
To make the point explicit, bar now contains the original foo function: (bar) ;=> 42 -- 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

Re: Any way to replace function body?

2019-01-20 Thread Mars0i
Functions are values. Why not just this: (defn foo [] 42) (def bar foo) (defn foo [] (inc (bar))) (foo) ;=> 43 -- 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

Re: [ANN] Clojure 1.10.0-RC5

2018-12-12 Thread Mars0i
On Wednesday, December 12, 2018 at 6:42:47 AM UTC-6, Alex Miller wrote: > > Thanks for the feedback! I assume the spec one was a bad import statement? > Yes, exactly. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: [ANN] Clojure 1.10.0-RC5

2018-12-11 Thread Mars0i
I have a couple of small apps that use interop pretty heavily because the Java library I'm using is very inheritance-based. There are no problems running with RC5 (although spec did find a syntax error that had passed in 1.9). I don't use reflection explicitly, but turning on

Re: ClojureDocs example management?

2017-06-19 Thread Mars0i
> I think part of it is that examples are easy to edit, so if there are small > easily fixed mistakes, often someone will. Ah, I didn't realize that anyone can edit others' examples. The two cases in which I've seen complaints about bad community help/examples/etc. concerned very popular

ClojureDocs example management?

2017-06-18 Thread Mars0i
Who polices ClojureDocs? If someone adds a silly or simply incorrect example, does someone eventually remove it? Are there ever spam-like "examples"? Or are Clojure fans all good, thoughtful, careful people who never make foolish mistakes? I'm curious because I see no sign that anyone

Re: slackpocalypse?

2017-05-20 Thread Mars0i
Slack is working for me today. There are posts in the Clojure channel, for example, from just two hours ago. Maybe the end of the world didn't occur? On the other hand, the Specter channel says only "To see this channel's full history, upgrade to one of our paid plans." I'm not sure I

Re: slackpocalypse?

2017-05-19 Thread Mars0i
I have no opinion, but fwiw the OCaml folks began experimenting with Discourse about a week ago: https://discuss.ocaml.org. This isn't really an IRC/Slack style platform, afaics, but the discussions that led up to it included concern about Slack's message limit. (These discussions can be

Re: Incomplete With Destructuring Lists

2017-05-11 Thread Mars0i
There is also this sort of solution: (def xs (range 9)) (let [ [[a b c] mid3 [d e f]] (partition 3 xs) ] [a b c mid3 d e f]) => (0 1 2 (3 4 5) 6 7 8) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: Faster diffing for large-ish nested data structures

2017-04-22 Thread Mars0i
tbc++, lvh, I'm not surprised that Specter doesn't help. That seems reasonable. Although I have come up against Specter's limits, I've been surprised at what it can do, so as a non-expert I tend to err on the side of thinking that it might help if I don't know that it can't. -- You received

Faster diffing for large-ish nested data structures

2017-04-21 Thread Mars0i
This might be a job for which Specter is particularly useful. You might have to dive pretty deep into it, but if you get stuck, the creator Nathan Marz is often very helpful. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: static fields in gen-class

2017-04-17 Thread Mars0i
You can just define a variable with def in the file containing gen-class. gen-class won't help with this; it's just regular Clojure functionality: (def CLASSNAME "MyClass") That variable will be specific to the generated class, and public at least in the sense that it can be accessed in

Re: off-topic: stackof developer survey

2017-03-24 Thread Mars0i
On Friday, March 24, 2017 at 5:17:15 PM UTC-5, Gregg Reynolds wrote: > > > > On Mar 24, 2017 5:05 PM, wrote: > > > > > This did get me thinking though. If the community *did* want to score > highly > > on some of these metrics, what would those be? > > I'll be happy so

Re: off-topic: stackof developer survey

2017-03-23 Thread Mars0i
On Thursday, March 23, 2017 at 7:49:40 PM UTC-5, Mars0i wrote: > > The highest-paid win suggests there's greater demand than supply, so > people who aren't comfortable with FP or lisp may be forced to code in > Clojure, or try to for the sake of a job without doing it right, and ar

Re: off-topic: stackof developer survey

2017-03-23 Thread Mars0i
The highest-paid win suggests there's greater demand than supply, so people who aren't comfortable with FP or lisp may be forced to code in Clojure, or try to for the sake of a job without doing it right, and are unhappy as a result. -- You received this message because you are subscribed to

Can you extend a Java class, and add new fields and constructors to it?

2017-03-23 Thread Mars0i
gen-class lets you define multiple constructors: http://stackoverflow.com/questions/18780071/clojure-multiple-constructors-using-gen-class You can't define multiple fields that can be directed accessed from Java, but you can define accessors for data you store in other ways. gen-class gives

Re: Contribute Specter to Clojure core?

2017-03-12 Thread Mars0i
A few thoughts about Specter from someone new to it but who's already found it incredibly useful. I'm happy to be corrected on any points that I've misunderstood. Clojure functions follow something like the Unix "do one thing and do it well" ideal. There are exceptions, but a lot of what's

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-06 Thread Mars0i
On Monday, March 6, 2017 at 10:33:43 AM UTC-6, Mars0i wrote: > > On Monday, March 6, 2017 at 9:32:37 AM UTC-6, Alex Miller wrote: >> >> Ok, this looks like it's related to the macro gen, so I don't see any >> issue to fix in the spec - valid inputs at the point are eithe

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-06 Thread Mars0i
On Monday, March 6, 2017 at 9:32:37 AM UTC-6, Alex Miller wrote: > > Ok, this looks like it's related to the macro gen, so I don't see any > issue to fix in the spec - valid inputs at the point are either strings or > symbols - I think through eval you were ending up with a class instance. >

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-06 Thread Mars0i
On Monday, March 6, 2017 at 1:16:38 AM UTC-6, Mars0i wrote: > > > On Sunday, March 5, 2017 at 6:51:57 PM UTC-6, Alex Miller wrote: >> >> I would really appreciate seeing the ns declaration that caused the >> original error. I have not been able to exactly reproduce

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-05 Thread Mars0i
h a useful but not entirely Clojure-friendly Java library I'm using. This required violating some standard, useful coding guidelines. This file <https://github.com/mars0i/pasta/blob/master/doc/notes/defsimconfigOutputMarch2017.clj> contains pretty-printed output from macroexpand-1 (made w

Re: lein jar, uberjar don't allow hyphens in paths?

2017-03-04 Thread Mars0i
On Saturday, March 4, 2017 at 8:19:44 PM UTC-6, Sean Corfield wrote: > > Java doesn’t allow – in names. That’s why Clojure and Clojure tooling maps > – in names to _ in files (and classes). > Right, and this normally causes no problems (with a little bit of care). I experience no problems with

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-04 Thread Mars0i
On Saturday, March 4, 2017 at 7:58:38 AM UTC-6, Mars0i wrote: > > On Saturday, March 4, 2017 at 7:24:05 AM UTC-6, Alex Miller wrote: >> >> This is definitely related to the gen-class spec, but I'm not at a >> computer to look at enough stuff to say if the bug is y

Re: 1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-04 Thread Mars0i
On Saturday, March 4, 2017 at 7:24:05 AM UTC-6, Alex Miller wrote: > > This is definitely related to the gen-class spec, but I'm not at a > computer to look at enough stuff to say if the bug is your code or the > spec. > > You might try quoting rhe class name in case it's getting resolved to a

Re: Contribute Specter to Clojure core?

2017-03-03 Thread Mars0i
I've never used Specter, but my needs are modest compared to some Clojure programmers'. (Great introductory blog post, Nathan, btw.) Intuitively, it feels to me like Specter is too big of a monster to be in core. I am not surprised that that's not going to be an option. The idea of making

lein jar, uberjar don't allow hyphens in paths?

2017-03-03 Thread Mars0i
It looks like 'lein uberjar' and 'lein jar' don't like namespace path elements that contain hyphens. Example: lein new app foo-bar cd foo-bar Now edit src/foo_bar/core.clj, changing (ns foo-bar.core (:gen-class)) to (ns foo-bar.core (:gen-class :name foo-bar.core)) Then 'lein

1.9.0-alpha14 doesn't allow Java classes as return type in gen-class :method clause?

2017-03-03 Thread Mars0i
I have a working application that I've been developing using Clojure 1.8.0, and just tried it with 1.9.0-alpha14 on it. This generated a bunch of errors that look something like this: In: [3 :methods 32 2] val: java.lang.Object fails spec: :clojure.core.specs/method at: [:args :clauses

Re: Clojure community survey 2016 results

2017-02-07 Thread Mars0i
Thanks for the survey! I think the size distribution for the academic and government/military categories might be due to different respondents deciding how to disambiguate the question in different ways. For example, everyone who works for the U.S. government works in an organization of the

Re: if nil is true

2017-01-30 Thread Mars0i
On Monday, January 30, 2017 at 1:34:09 AM UTC-6, Sayth Renshaw wrote: > > Hi > > If nil is true > > clojure-noob.core> (nil? nil) > true > Similarly, user=> (false? false) true -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this

Re: [ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

2017-01-13 Thread Mars0i
Got it. Thanks David. -- 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 from this

Re: [ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

2017-01-12 Thread Mars0i
On Thursday, January 12, 2017 at 12:25:38 PM UTC-6, David Jarvis wrote: > > I'm not sure, though I have a hypothesis - is this an issue for all > sequences, or just for maps? > All sequences. Well, not exactly--see below. But I don't mind the one entry-per-line behavior for maps. It bothers

Re: [ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

2017-01-12 Thread Mars0i
Hi David (or anyone else)- Is there a way to make sequences print all on one line, as in the default repl behavior, rather than with one element per line? I haven't found anything about this in the documentation or in the whidbey config map. Thanks. -- You received this message because

Re: [ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

2017-01-11 Thread Mars0i
David, thanks very much for the quick reply. (!) OK, got it now. update-options! will be useful because sometimes I have a lot of state set up within the repl and then realize that I want to change the size of the terminal window to see more data at once (or to see more windows at once). --

Re: [ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

2017-01-10 Thread Mars0i
One more question--should have included it before. Is there a way to change the print width apart from in profile.clj or project.clj, e.g. with a function in the repl. That way I resize the terminal to see more on each line, I wouldn't have to exit out and change the width. Thanks- -- You

Re: [ANN] Ultra v0.5.1 - a Leiningen plugin for a superior development environment

2017-01-10 Thread Mars0i
Very nice. Thank you. One question because my ignorance about how to configure plugins in general--I hope you don't mind. Where would I put this: {:ultra {:repl {:width 180 :map-delimiter "" :extend-notation true :print-meta true

Re: Cyclic namespace dependencies!

2016-12-30 Thread Mars0i
On Friday, December 30, 2016 at 7:59:46 PM UTC-6, puzzler wrote: > > On Fri, Dec 30, 2016 at 4:55 PM, Timothy Baldridge > wrote: > > I wonder whether there could be something like an `external-declare` that > would satisfy Rich's concerns about knowing how to intern

Re: Cyclic namespace dependencies!

2016-12-30 Thread Mars0i
Aaron, thanks for the RH quote. I had looked at parts of that Yegge discussion at one point, I think, but I don't recall reading this section of Rich's remarks. I never succeeded in understanding Common Lisp packages well enough to use the successfully. I tried and gave up. Rich may be

Re: Cyclic namespace dependencies!

2016-12-30 Thread Mars0i
Thanks Nathan! (See what I mean about my ignorance?) On Friday, December 30, 2016 at 3:53:27 PM UTC-6, Nathan Davis wrote: > > > On Friday, December 30, 2016 at 10:13:49 AM UTC-6, Mars0i wrote: >> >> I love Clojure. But: My number one complaint about it is that the &g

Cyclic namespace dependencies!

2016-12-30 Thread Mars0i
I love Clojure. But: My number one complaint about it is that the compiler won't allow cyclic namespace dependencies. I am not a compiler-writer, but as far as I can tell the only reason for this restriction is ... philosophical. It forces bad code organization, and it wastes time. Those

Re: Errors

2016-12-05 Thread Mars0i
On Monday, December 5, 2016 at 10:36:59 PM UTC-6, Sean Corfield wrote: > > Several of the Clojure/core folks have said at various times over the > years that Clojure is deliberately not optimized for novices, on the > grounds that whilst everyone starts out as a novice, most of your time >

Re: any? in clojure 1.9.0 alpha

2016-11-07 Thread Mars0i
> Personally I think "any?" and "some?" are aptly named, and that it's the > older "not-any?" and "some" functions that mess things up. > I can understand the intuition that "not-any?" and "some" are the oddballs, but "Are there any Xs?" and "Are there some Xs?" are true in exactly the same

Re: any? in clojure 1.9.0 alpha

2016-11-06 Thread Mars0i
On Monday, November 7, 2016 at 12:16:28 AM UTC-6, Mars0i wrote: > > "any?" wasn't the only option. I would have gone with something obvious > like "always-true", or "yes", or even something possibly too-clever like > "arg-or-not-arg?"

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?"

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

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 <mars...@logical.net > > wrote: > >> Looks very nice! Thanks Jean Niklas. I've been using Incanter for >> charts, whi

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: Should I switch to Clojure after 3 years of learning another full stack ?

2016-10-13 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

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 -

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

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

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

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

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
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?

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

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

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

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, >

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

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: 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: 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: 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--at

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

2016-07-25 Thread Mars0i
nday, 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 failures. Maybe explain-data's behavior hasn't ye

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: 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

Re: meaning of spec/and ?

2016-07-21 Thread Mars0i
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 <mars...@logical.net > &

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

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. > >

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

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 yo

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

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

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

Re: clojure.spec

2016-05-25 Thread Mars0i
anks 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 of what

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

[question] lein repl exceptions

2016-05-19 Thread Mars0i
Try (pst) . -- 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 from this group, send

Re: Porting Clojure to Native Platforms

2016-04-25 Thread Mars0i
On Tuesday, April 26, 2016 at 12:19:23 AM UTC-5, Mars0i wrote: > > I was going to say that I'd be surprised if Clojure were as fast as SBCL > (overall, on average, depends on your application, depends on how you code > it, ymmv, etc. ...). Then I stopped back to check the littl

Re: Porting Clojure to Native Platforms

2016-04-25 Thread Mars0i
On Monday, April 25, 2016 at 3:50:45 PM UTC-5, tbc++ wrote: > > As someone who has spent a fair amount of time playing around with such > things, I'd have to say people vastly misjudge the raw speed you get from > the JVM's JIT and GC. In fact, I'd challenge someone to come up with a > general

Re: Are strings vectors? Should 'get' docstring be changed?

2016-04-21 Thread Mars0i
On Thursday, April 21, 2016 at 2:20:11 PM UTC-5, Mars0i wrote: > The behavior with strings is simply undocumented anywhere, afaik, though. > Sorry, that was wrong even before I added an example to clojure.docs. The conj.io documentation is quite explicit and detailed. -- You re

Re: Are strings vectors? Should 'get' docstring be changed?

2016-04-21 Thread Mars0i
On Thursday, April 21, 2016 at 11:49:16 AM UTC-5, Andy Fingerhut wrote: > > Most doc strings are considered terse by many people. This appears to be > considered a feature by those who maintain Clojure, not a bug, with one > reason given by Stuart Halloway in his recent talk on using the

Are strings vectors? Should 'get' docstring be changed?

2016-04-21 Thread Mars0i
The docstring for 'get' says nothing explicit about vectors ("Returns the value mapped to key, not-found or nil if key not present.") but most of us know that vectors can be viewed as associative data structures where indexes are like keys: (get [\a \b \c] 1) \b 'get' also works on strings:

Re: Pmap on hash maps

2016-04-17 Thread Mars0i
On Sunday, April 17, 2016 at 4:23:32 PM UTC-5, JvJ wrote: > > Orders of magnitude? Is it even worth running things in parallel in this > case? > I got a 2X-5X speed improvement with pmap, but as adrian says, it depends. The nice thing about pmap, though, is that using it just involves adding

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Mars0i
wn code to process in > futures and delays, but when I found the claypoole library, especially it's > unordered pmap and for, I never had to touch these again. > > On Wednesday, April 6, 2016 at 3:11:52 PM UTC+2, Mars0i wrote: >> >> Maybe people forget about pmap <http://clojure

Re: Upgrading to Clojure 1.8 (direct linking)

2016-04-06 Thread Mars0i
I think I got a big speed boost going from 1.6 to 1.7, and a smaller boost going from 1.7 to 1.8. On Wednesday, April 6, 2016 at 3:38:07 PM UTC-5, Piyush Katariya wrote: > > > Has anybody experienced the performance boost by switching to Clojure > version 1.8 (and direct linking) ? > -- You

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-06 Thread Mars0i
Maybe people forget about pmap , pcalls , and pvalues because they're just too easy. On Tuesday, April 5, 2016 at 8:51:59 PM UTC-5, tbc++ wrote: > > If it all

Re: New Matrix Multiplication benchmarks - Neanderthal up to 60 times faster than core.matrix with Vectorz

2016-03-19 Thread Mars0i
Well, will disagree about some things, but agree very much about others--probably all practical matters. Some of your remarks seem valuable. Some don't seem relevant to me. Ah well, we're just talking here. Not everything needs to matter. Your point about thriving, competing libraries is

Re: New Matrix Multiplication benchmarks - Neanderthal up to 60 times faster than core.matrix with Vectorz

2016-03-14 Thread Mars0i
Dragan, I still support you doing whatever you want with your time, and I'm grateful that you've produced was I gather is a great library. Wonderful. I don't feel that you have to implement the core.matrix api--but I really, really wish someone would produce a core.matrix interface to

Re: Doing matrix arithmetic with complex numbers

2016-03-05 Thread Mars0i
You might want to post this on the Numerical clojure group as well or instead. I've never tried using complex numbers with core.matrix. -- 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

Re: Clojure beginner: IF statement error!

2016-03-05 Thread Mars0i
Just spelling out what the previous comments implied: You're giving 'if' five arguments: (= M 0) 1 "in case pow is 0 return 1" (do (* N (recur N (- M 1) "decrease power M each itr" 'if' needs at least two arguments, and is normally used with three. If you delete the strings, your code

Re: Clojure glosary

2016-02-20 Thread Mars0i
Is the idea that you want a list of very brief definitions, rather than the long discussions in the Reference section of clojure.org? On Friday, February 19, 2016 at 9:42:56 PM UTC-6, Tianxiang Xiong wrote: > > Thanks, but a cheatsheet is not really what I'm looking for. The > cheatsheet

Re: unable to understand the behaviour of core.matrix/emap ( Bug maybe? )

2016-02-18 Thread Mars0i
Yes, that looks like a bug. If you try it with ndarray, you get the results I would expect: => (def t (mx/array :ndarray [[10][20]])) => t #object[clojure.core.matrix.impl.ndarray_object.NDArray 0x40514dab "[[10] [20]]"] => (pm t) [[10.000] [20.000]] => (pm (emap / t 10)) [[1.000]

Re: Power function

2016-02-03 Thread Mars0i
https://github.com/clojure/math.numeric-tower: - (expt x y) - x to the yth power -- 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

Re: In search of the little transducer

2016-01-31 Thread Mars0i
Thanks jjttjj, Magomimmo. I do prefer reading to videos, but I'll consider getting Baldridge's series anyway. Seems worth it. I don't mind paying. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

In search of the little transducer

2016-01-29 Thread Mars0i
Years ago, I learned Common Lisp and Scheme. I read a number of books that explained recursion. I understood what I read ... but I never really got it. It wasn't a part of me. Then I worked through *The Little Lisper* (renamed *The Little Schemer*), and it became second nature. Studied ML,

Re: clojure.compiler.disable-locals-clearing memory leak?

2016-01-26 Thread Mars0i
On Tuesday, January 26, 2016 at 3:51:09 AM UTC-6, icamts wrote: > > Are you using the same JVM? It's an optimization introduced at some point > in JVM GC. It can be turned off with the JVM flag -XX:-UseGCOverheadLimit. > See >

Re: clojure.compiler.disable-locals-clearing memory leak?

2016-01-25 Thread Mars0i
On Monday, January 25, 2016 at 9:26:17 AM UTC-6, Alex Miller wrote: > > When you disable locals clearing, you will start holding the head of > (potentially large) locals everywhere. This is the reason that locals are > aggressively called in the first place. This is a typical consequence of >

Re: clojure.compiler.disable-locals-clearing memory leak?

2016-01-25 Thread Mars0i
especially interesting, though--thanks. > > > On Monday, January 25, 2016 at 12:49:03 AM UTC-6, Mars0i wrote: >> >> In my application, I seem to get a memory leak when I use >> -Dclojure.compiler.disable-locals-clearing=true in Clojure 1.7.0 and 1.8.0, >>

clojure.compiler.disable-locals-clearing memory leak?

2016-01-24 Thread Mars0i
In my application, I seem to get a memory leak when I use -Dclojure.compiler.disable-locals-clearing=true in Clojure 1.7.0 and 1.8.0, but not in 1.6.0. (i.e. I get "java.lang.OutOfMemoryError: GC overhead limit exceeded" with the more recent versions). Any guesses about why this might

Re: Clojure based office suite?

2016-01-22 Thread Mars0i
There is a text editor written in Clojure: https://github.com/maitria/avi That's pretty far from an office suite ... -- 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

  1   2   3   4   >