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

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

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 w

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

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 poin

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 unencountered > vars, while

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

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

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 m

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 grou

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 group

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 sa

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

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 uberja

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

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

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-05 Thread Mars0i
nterop with 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 macroe

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

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

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 gr

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 you

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 th

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 rig

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 long as Clojure is the

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 Clojur

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

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 t

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 clojure@goo

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 found

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 under

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 police

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 langua

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 *warn-on-reflec

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 email

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 mem

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

range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Mars0i
In Clojure 1.6.0, *range* returned a LazySeq, which could be tested with *realized?*. In Clojure 1.7.0 and 1.8.0-alpha3, it returns an Iterate, a Range, or a LongRange*. * realized? only works with the first of these three. For example: Clojure 1.6.0: user=> (class (range 5)) clojure.lang.

Re: range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Mars0i
Also, (realized? (range)) is true in 1.7.0, but false in 1.6.0. (realized? (rest (range))) is false in 1.7.0 but throws an exception in 1.6.0, fwiw. On Thursday, July 30, 2015 at 11:16:03 AM UTC-5, Mars0i wrote: > > In Clojure 1.6.0, *range* returned a LazySeq, which could be teste

Re: range no longer returns a LazySeq; how to check whether realized?

2015-07-30 Thread Mars0i
OK, thanks. (I didn't have a real use case. It's useful for experimenting at the prompt.) On Thursday, July 30, 2015 at 7:30:46 PM UTC-5, Alex Miller wrote: > > Yes, this behavior has changed. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: Changing write output file on the fly

2015-07-31 Thread Mars0i
with-open and spit might be useful. You could also rebind *out*. That may be enough to point you in the right direction, but this page

Re: Complete lack of helpful compilation errors with :gen-class

2015-08-02 Thread Mars0i
I don't have anything helpful to say, but: I've often gotten a useful stacktrace from compile-time errors using 'lein compile' with :gen-class. Not always. Sometimes I have to use the guess-and-comment-out method. So I think that whatever's happening is not just an issue with compilation of

Re: range no longer returns a LazySeq; how to check whether realized?

2015-08-02 Thread Mars0i
On Sunday, August 2, 2015 at 4:05:02 PM UTC-5, Matching Socks wrote: > > By the way, -- When is it useful to know whether a lazy sequence has been > realized? > I don't know what people do with it in production code, but one reason you might want to know would be that you have a lazy sequence th

Re: Complete lack of helpful compilation errors with :gen-class

2015-08-03 Thread Mars0i
c dependencies between explicit references to classes.) > changes in between the two tests. And this only happens when my Clojure > file is subclassing a Java object. Very, very strange... > > On Monday, August 3, 2015 at 12:27:38 AM UTC-5, Mars0i wrote: >> >> I don'

Re: Complete lack of helpful compilation errors with :gen-class

2015-08-03 Thread Mars0i
move >> the function definition up before the point where I was calling it, >> everything compiles fine, and no linkage error. No library changes in >> between the two tests. And this only happens when my Clojure file is >> subclassing a Java object. Very, very strange...

Re: Clojure beyond Java 6 ?

2015-08-12 Thread Mars0i
For whatever it's worth, I do a lot of Clojure programming on two old Macs. They were both running Snow Leopard until this week; now one is running Yosemite (ugh), and the other will run Snow Leopard until I get a new computer to replace it in a few months. Since S.L. doesn't support anything

Re: Clojure Truck Factor

2015-08-16 Thread Mars0i
Gary, Nice point about Rich's role in maintaining the direction and sensibility of Clojure. I sometimes complain about some choices that have been made for the language, but overall, it's the clear, sensible design that makes Clojure a pleasure to use. -- You received this message because yo

Re: Beginning Clojure Development

2015-09-10 Thread Mars0i
Many people say that the *Joy of Clojure* is best for fine details and all that, and there's something right about that claim. However, *Clojure Programming* covers some fine details that *Joy *doesn't even mention, even in the 2nd edition (e.g. important aspects of Java interop). I suspect t

Re: Origin for Clojure using the term 'vector' instead of 'array'?

2015-10-02 Thread Mars0i
I have no idea about the official reason, but outside of certain programming languages that use "array" for one-dimensional data structures, an array often has two (or more) dimensions. In R, for example, arrays can have an arbitrary number of dimensions. Honestly, when I'm away from Java for

Re: complex numbers in clojure

2015-11-06 Thread Mars0i
I leave it to others to assess the tradeoffs, but: Anything that's done to better support scientific computing has potential to pay off in the long run with greater popularity for Clojure. Most, or many scientists work in universities. Professors have students--lots of students, over time. So

Re: Procedurally generated animation in Clojure

2015-11-10 Thread Mars0i
Cool. Thanks. I experimented with the quil wrapper around Processing at one point. I'm glad quil exists, but the underlying non-functional-programming model of Processing can sometimes make it awkward. -- You received this message bec

Naming convention for atoms, refs, etc.?

2015-12-05 Thread Mars0i
Does anyone want to suggest or promote a naming convention for atoms, refs, and agents, i.e. some of things that you can dereference with @ i.e. deref? (Also, what about futures, delays, and promises? I think of these as playing a different sort of role, even though deref works with them, too.)

Re: Naming convention for atoms, refs, etc.?

2015-12-05 Thread Mars0i
&, $, and ! might be good to use as special naming characters for atoms/refs/agents, either as an initial char, a final char, or both, but I'm wondering whether anyone already has a naming convention that they use. -- You received this message because you are subscribed to the Google Groups "Cl

Re: Naming convention for atoms, refs, etc.?

2015-12-05 Thread Mars0i
On Saturday, December 5, 2015 at 5:45:22 PM UTC-6, James Reeves wrote: > > Why should they have any sort of naming scheme? Dynamic vars are unusual > because their values can change. Atoms and refs remain the same, and even > though inside their values mutate, they don't affect the outer var. >

Re: Naming convention for atoms, refs, etc.?

2015-12-05 Thread Mars0i
On Saturday, December 5, 2015 at 8:04:34 PM UTC-6, tbc++ wrote: > > Also, if you have so many atoms in your program that it becomes hard to > remember where they are, that would be another source of concern ;-) > Yeah I'm worried that I'll come back to the code a year later and not remembe

Re: [ANN] 2015 State of Clojure Community survey

2015-12-05 Thread Mars0i
As in the past, many survey questions are not appropriately designed for getting info about uses of Clojure in academic research. I don't think there's very much use of of Clojure for this purpose, but the survey won't be able to track it. (Examples: 7. Where do you deploy Clojure, ClojureSc

Re: [ANN] 2015 State of Clojure Community survey

2015-12-06 Thread Mars0i
On Sunday, December 6, 2015 at 3:26:55 PM UTC-6, Lee wrote: > > > On Dec 6, 2015, at 3:00 PM, Alex Miller > wrote: > > > Almost all of the questions are optional - if they don't apply to your > scenario, you should skip the question. > > FWIW if I recall correctly (it won't let me back in to

Re: Naming convention for atoms, refs, etc.?

2015-12-06 Thread Mars0i
On Sunday, December 6, 2015 at 5:52:02 PM UTC-6, Glen Mailer wrote: > > I saw some sample code that prefixed the atom name with a ! recently, > seemed to look sensible to me. > > (swap! !state conj :whatever) > > And so on. > This idea is conceptually elegant, since the marker, !, is the same as

Re: Naming convention for atoms, refs, etc.?

2015-12-09 Thread Mars0i
Another use case, fwiw: (def my-atom (let [... ...] (atom ...))) A special naming convention for (e.g.) atoms makes it clear that what's below the many lines of let bindings (and maybe comment lines, too) is going to produce an atom; you don't have to read down and find

Re: Naming convention for atoms, refs, etc.?

2015-12-10 Thread Mars0i
On Thursday, December 10, 2015 at 4:40:49 AM UTC-6, Dan Kersten wrote: > > I write such code like this: > > (defn sdescriptive-name [] ) > (def my-atom (atom (descriptive-name))) > > Where descriptive-name would describe the data shape or purpose. > This way the atom is not obscured behind many l

Re: [ANN] New clojure.org!

2016-01-15 Thread Mars0i
I like the new look a lot. Thanks. One comment: The cheatsheet now links to Grimoire pages that seem to be for Clojure 1.6.0. The old default cheatsheet linked to ClojureDocs, which looks better and includes a few more useful features, such as links to related functions and to the source. --

Re: [ANN] New clojure.org!

2016-01-18 Thread Mars0i
On Friday, January 15, 2016 at 2:36:46 PM UTC-6, Mars0i wrote: > > I like the new look a lot. Thanks. > > One comment: The cheatsheet now links to Grimoire pages that seem to be > for Clojure 1.6.0. The old default cheatsheet linked to ClojureDocs, which > looks better and i

Re: [ANN] New clojure.org!

2016-01-18 Thread Mars0i
in order to see whether there's any useful information in one but not the other. On 01/15/2016 02:36 PM, Mars0i wrote: > > I like the new look a lot. Thanks. > > One comment: The cheatsheet now links to Grimoire pages that seem to be > for Clojure 1.6.0. The old default c

Re: [ANN] New clojure.org!

2016-01-19 Thread Mars0i
ad which I don't think it's > worthwhile to invest time competing against. Hence my goal has been to > provide augmented docstrings which are I hope more helpful. > > Reid > > [1] conj.io/worklist > > On 01/18/2016 09:31 PM, Mars0i wrote: > > Thanks Reid.

Re: Clojure beyond Java 6 ?

2016-01-21 Thread Mars0i
On Thursday, January 21, 2016 at 12:14:33 PM UTC-6, Sean Corfield wrote: > > The Frege project (a Haskell for the JVM) is running into problems with > the Java 8 compiler (producing invalid JVM bytecode or just Ugh. Am I making a mistake by using Java 8? "Invalid JVM bytecode", i.e. it's sy

Re: Clojure beyond Java 6 ?

2016-01-21 Thread Mars0i
Thanks Alex, Mike, Sean for clarification about Java 8 in relation to Clojure. I breath easier now. :-) -- 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 ar

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 ne

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

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

2016-01-25 Thread Mars0i
ions look 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,

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-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 > https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/m

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: 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 clojure@googleg

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 moderat

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] [2.000]]]

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 lists

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 wi

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 N

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 Neandert

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: [ANN] Elements of Clojure

2016-03-19 Thread Mars0i
Strunk didn't call his book "Elements of English". On Thursday, March 17, 2016 at 4:48:21 PM UTC-5, Zach Tellman wrote: > > > Where possible, this book will give specific, prescriptive advice on how > to write idiomatic Clojure. Everywhere else, it will describe the space of > possible approache

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 seems

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

Re: Advice getting started with concurrency and parallelism in Clojure

2016-04-07 Thread Mars0i
ng my own 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 <

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 a

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

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 receive

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 u

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 lit

[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 em

Documentation, tips on chunked sequence functions?

2014-02-05 Thread Mars0i
It's easy to find information on the net about the general concept of a Clojure chunked sequence, and about the effects of using chunked sequences. I would like to understand the code that deals with chunked sequences in the Clojure source, in functions such as map and doseq. Any suggestions

Re: Documentation, tips on chunked sequence functions?

2014-02-05 Thread Mars0i
Just to be completely clear, I want to understand the source code for map and doseq. The parts that deal with chunked sequences are confusing to me. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googleg

Re: map semantics

2014-02-07 Thread Mars0i
Andy C, I think that in the Clojure world, there is a widespread view that lazy sequences should be the (or one of the) primary datatypes, that iteration should usually produce lazy sequences, etc. They are something like the default in Clojure. Clojure includes a systematically organized and

Re: Alternative ->> macro for threading sequences?

2014-02-07 Thread Mars0i
Since a few of these higher order functions--map, filter, reduce, etc.--are so common and useful, I wonder whether there could be sufficient benefit to having some abbreviations for them. I know that some of these characters are already taken, but just to sketch the idea: (--> things %wrangle

<    1   2   3   4   >