Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Andy Fingerhut
these steps while working > in the dark is surely unrealistic? Linking to a broken install programme, > and offering a .bat that uses wget without explaining how to get it working > on Windows is seriously unhelpful, I would suggest... > > > > On Saturday, 25 October 2014 15:49:21

Re: Demoralising experience trying to install on Win 7

2014-10-25 Thread Andy Fingerhut
Geoff: I hesitated before replying, because I was concerned that anything I could say other than "we'll get right on that" will sound at best like an excuse, or at its worst like a dismissal. The tone I am hoping to achieve here is a neutral factual explanation. Please try to read it that way.

Re: A proposal for an alternative implementation of clojure.core/transduce

2014-10-15 Thread Andy Fingerhut
Dan, I haven't read yours or Christophe Grand's articles thoroughly enough even to know whether your ideas are similar, but you may be interested to read this thread, and the blog posts written by Christophe, linked from his first message in this discussion thread: https://groups.google.com/forum/#

Re: Chestnut memory usage

2014-10-13 Thread Andy Fingerhut
You may want to be more explicit about dependencies you've added to your project.clj file, or what the contents of your ~/.lein/profiles.clj file is. (run) an (browser-repl) throw exceptions as being undefined if your ~/.lein/profiles.clj is empty, and project.clj has its default contents. Andy

Re: uniqueness of hash if computed on different jvms across different machines.

2014-10-13 Thread Andy Fingerhut
For immutable values (including hash-maps containing only immutable values), I believe the answer is yes, if you are using the same version of Clojure on the different jvms (at least, I cannot think of any counterexamples in a few minutes of thinking about it, and I have looked at the hash function

Re: Keyword comparison performance

2014-10-11 Thread Andy Fingerhut
The common case in hash map lookup for keywords _that finds a matching key in the map_ is: (a) hash the keyword (fast, because it is cached) (b) use the hash code value to walk one or more nodes in a tree to reach a leaf, where there can be a single value, or a linked list of multiple colliding va

Re: Keyword comparison performance

2014-10-11 Thread Andy Fingerhut
I haven't taken the time to verify these statements with microbenchmarks, but there are 2 reasons why keywords should have efficiency advantages over strings when used as hash map keys: (a) For keywords, hash values are calculated and cached when the keyword is first constructed. When looking up

[PSA] Rock the Clojure JIRA vote

2014-10-09 Thread Andy Fingerhut
For Clojure and ClojureScript, those reports do not list all open tickets (there are over 400 such tickets as of today for Clojure), only ones that already have votes, or they have already made some progress towards resolution (e.g. a Clojure screener has marked the ticket as Triaged [3]). Andy F

Re: Profiling in Counterclockwise

2014-10-05 Thread Andy Fingerhut
I would suggest doing Google searches for combinations of terms such as: clojure profiling That search found several relevant matches when I tried it. I am not sure why you say "2) Deploy to somewhere", unless by "somewhere" you include running a JVM on your own local development machine? Y

Re: Clojuredocs broken

2014-10-03 Thread Andy Fingerhut
If you scroll down to near the bottom of the ClojureDocs.org home page, there is a Give Feedback section with a link to where you can create an issue on Github. I'd recommend including browser version numbers in your report, too, just in case. Have you tried Firefox? I had an issue on ClojureDoc

Re: Clojure cheat sheet now links to ClojureDocs.org for things added since Clojure 1.4

2014-10-01 Thread Andy Fingerhut
el Rosario wrote: > Looks great! Question, what is the relationship between this[1] and the > Grimoire[2] cheatsheet? > > [1]: > http://jafingerhut.github.io/cheatsheet/grimoire/cheatsheet-tiptip-cdocs-summary.html > [2]: http://grimoire.arrdem.com/ > > > On Tuesday, Sept

Re: Clojure cheat sheet now links to ClojureDocs.org for things added since Clojure 1.4

2014-09-29 Thread Andy Fingerhut
pdf https://github.com/readevalprintlove/clojurescript-cheatsheet/blob/master/cljs-cheatsheet.pdf [1] https://github.com/jafingerhut/clojure-cheatsheets/tree/master/src Andy On Mon, Sep 29, 2014 at 5:00 PM, gvim wrote: > On 29/09/2014 22:52, Andy Fingerhut wrote: > >> >>

Clojure cheat sheet now links to ClojureDocs.org for things added since Clojure 1.4

2014-09-29 Thread Andy Fingerhut
The Clojure cheat sheet with links to ClojureDocs.org [2] now also links to ClojureDocs.org for things added since Clojure 1.4, because now ClojureDocs.org [1] has been updated to include all of those things. I suspect Zachary Kim, or perhaps several people, deserve a round of applause for all of

Re: clojure/data.json parsing

2014-09-27 Thread Andy Fingerhut
I am not sure what is going wrong here, and I do not know whether the cheshire library [1] will behave as you wish, but it is worth a try. [1] https://github.com/dakrone/cheshire Andy On Sat, Sep 27, 2014 at 10:24 AM, Alan Moore wrote: > Here is a portion of the data: > > Async HTTP GET: 200

Re: Clojure cheatsheet v16 with few updates for Sets, Maps, and Relations sections

2014-09-04 Thread Andy Fingerhut
I noticed that the URL still implies usage of Clojure 1.3: > http://jafingerhut.github.io/cheatsheet-clj-1.3/cheatsheet-tiptip-cdocs-summary.html > > Should this change as well? > > Alan > > > > On Fri, Aug 29, 2014 at 6:56 AM, Andy Fingerhut > wrote: > &

Re: Almost purely functional sortable (demo)

2014-09-03 Thread Andy Fingerhut
On Mac OS X 10.8.5 + Safari 6.1.6, very nice, very slick. On Mac OS X 10.8.5 + Firefox 32.0, very frustrating, and doesn't work like it does on Safari at all. Not sure if that is a known issue or not. Andy On Wed, Sep 3, 2014 at 11:06 AM, Eldar Gabdullin wrote: > Code - > https://github.com/

Re: clojure streams

2014-08-31 Thread Andy Fingerhut
message that it is obsolete, and chunked seqs wont out over streams, would be a good idea for those who come across it. Andy On Sun, Aug 31, 2014 at 11:50 AM, Andy Fingerhut wrote: > I have a note in a list of things to do that I have been maintaining that > says " Remove now-obsolete

Re: clojure streams

2014-08-31 Thread Andy Fingerhut
I have a note in a list of things to do that I have been maintaining that says " Remove now-obsolete http://clojure.org/streams and any links to it (RH said in 2009 that streams lost to chunked sequences)". I don't have a link handy to that email that suggested this change, nor to a quote by Rich

Re: Why is this an Exception ?

2014-08-30 Thread Andy Fingerhut
How would another Lisp avoid giving you an error when referring to a symbol that has no value? If you just want your entire program in a single namespace, and don't want to use any libraries in other namespaces, then simply don't use the "/" character in your symbol names. If you want to use the

Clojure cheatsheet v16 with few updates for Sets, Maps, and Relations sections

2014-08-29 Thread Andy Fingerhut
Newest version available here: http://jafingerhut.github.io Updates will likely make their way to the Grimoire and Clojure.org cheatsheet pages in time. I was reviewing the sections of the cheatsheet on Sets and Maps, and grew dissatisfied with the placement of some of the functions. I adde

Re: What is happening in this code?

2014-08-27 Thread Andy Fingerhut
FYI, if you *want* warnings about redefinition of functions, or any vars in general, the Clojure lint tool Eastwood does that, among other things: https://github.com/jonase/eastwood Andy On Wed, Aug 27, 2014 at 7:32 AM, Tassilo Horn wrote: > Hemant Gautam writes: > > Hi Hemant, > > > Thi

Re: Compilation failure to reject arguments matching formal parameters

2014-08-15 Thread Andy Fingerhut
I don't know how hard or easy it might be to implement a check like this in a lint tool like Eastwood, but I've created a Github issue for it with the idea, linking to this discussion, in case someone thinks of a way. https://github.com/jonase/eastwood/issues/83 Andy On Fri, Aug 15, 2014 at

Re: how do I clojure.string/replace regex characters? Escaping gives me StringIndexOutOfBoundsException

2014-08-04 Thread Andy Fingerhut
Or even more simply, since the thing you want to replace is a single character, you do not need a regex to match it, but can match a string that is not a regex at all, e.g.: (st/replace "**username" "*" "$") The doc string for clojure.string/replace is fairly explicit on this. Andy On Mon, Aug

Re: Transposing a map and back again

2014-08-01 Thread Andy Fingerhut
clojure.set/map-invert is the closest I can think of in the functions included with Clojure to your transpose function, but it does not handle duplicate values the way your transpose does. Andy On Fri, Aug 1, 2014 at 11:16 AM, Bruno Kim Medeiros Cesar < brunokim...@gmail.com> wrote: > Is there

Re: Future termination

2014-07-31 Thread Andy Fingerhut
n't terminates at all. I was waiting > about an hour. > Also this issue affects code which uses datomic.api, which, I think, uses > futures too. > > Середа, 30 липня 2014 р. 22:50:11 UTC+3 користувач Andy Fingerhut написав: >> >> Never is an awfully long time :-) I

Re: Redefined 'count' produces no warning

2014-07-30 Thread Andy Fingerhut
> detect bugs in our code and peculiarities - that are not bugs but should be >> rewritten for clarity - so I'd heartily recommend it to everyone). >> >> Sean >> >> On Jul 30, 2014, at 10:32 AM, Andy Fingerhut >> wrote: >> >> This would b

Re: Future termination

2014-07-30 Thread Andy Fingerhut
Never is an awfully long time :-) If you wait about 60 seconds, the command you gave calling (future 1) does terminate, at least on Mac OS X 10.8.5 where I tested it, and I have seen the same behavior on Linux and I think Windows. This version terminates much more quickly: java -jar clojure-1.6.

Re: Redefined 'count' produces no warning

2014-07-30 Thread Andy Fingerhut
This would be an appropriate kind of check for a lint tool like Eastwood to make, and warn about. It currently does not do so, but I've created an issue to remind me of the potential enhancement. [1] It is up to the Clojure core team to decide whether they would like to make such a change to the

Re: Tools for cleaning namespaces?

2014-07-28 Thread Andy Fingerhut
You can try Eastwood's :unused-namespaces linter for #2. It is disabled by default, so you need to give an option on the command line to enable it. If you want to try *only* that linter, and none of the other warnings, first follow the simple install instructions in the README, then change to the

Re: Is this behavior with recur and pre/post a bug?

2014-07-25 Thread Andy Fingerhut
Sorry, I forgot the following disclaimer: I am in no way an official voice for what will or will not be changed in Clojure in the future. I am merely an interested observer of what has changed in Clojure in the past. I've created and edited some tickets, written some Clojure patches, some of whic

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Andy Fingerhut
I do not see any straightforward change to Clojure that would enable this to work (someone else might, though). Given that adding a loop form inside the function is a fairly straightforward workaround to the limitation, and the difficulty of enhancing it to avoid the limitation, I would personally

Re: Is this behavior with recur and pre/post a bug?

2014-07-24 Thread Andy Fingerhut
I do not know whether it is considered a bug or not, but it is definitely caused by the postcondition handling causing the recur to be knocked out of tail position. Here is a reference to the code: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4185-L4192 Andy On Thu,

Re: clojure.stacktrace/root-cause VS clojure.repl/root-cause, are they redundant?

2014-07-24 Thread Andy Fingerhut
I know of no way that older exceptions than *e are automatically saved anywhere (unlike the results of previous REPL expressions, of which the last 3 are saved in *1 *2 *3). When an exception occurs, it is probably much less error-prone to type a short expression like (def e1 *e) to save the excep

Re: A few String functions we could implement in Clojure?

2014-07-19 Thread Andy Fingerhut
on multiple platforms (I'm thinking > specifically clojure/clojurescript and cljx)? > > cheers, > Bruce > > On Sat, Jul 19, 2014 at 4:17 PM, Andy Fingerhut > wrote: > > Pierre: > > > > I maintain the cheatsheet, and I put .indexOf and .lastIndexOf on t

Re: A few String functions we could implement in Clojure?

2014-07-19 Thread Andy Fingerhut
Pierre: I maintain the cheatsheet, and I put .indexOf and .lastIndexOf on there since they are probably the most common thing I saw asked about that is in the Java API but not the Clojure API, for strings. There are also links to whole Java classes and their entire API, e.g. for file I/O, for whi

Re: casting error

2014-07-16 Thread Andy Fingerhut
Try fully qualifying the class name in the return type hint. Might be the same symptom as in this ticket: http://dev.clojure.org/jira/browse/CLJ-1232 Andy On Wed, Jul 16, 2014 at 7:18 PM, Brian Craft wrote: > Apparently this is due to a class loader problem. > > I moved it into a different fi

[ANN] Clojure cheatsheet variants with links to Grimoire

2014-07-11 Thread Andy Fingerhut
synchronization between them. It remains to be seen how things will progress from here, but I thought it would be nice to provide the option and let people decide what they want to use. Please, please, no harsh words about what people besides yourself ought to do. Andy Fingerhut -- You

Re: How to use functions from clojure.contrib?

2014-07-09 Thread Andy Fingerhut
Pierre: The link to the page "Where did Clojure.Contrib Go" on the page where you noted that clojure.contrib is deprecated gives the names of current "modular" contrib libraries that contain most or all of what *some* older clojure.contrib libraries contained. Unfortunately clojure.contrib.seq ha

Re: [ANN] Grimoire: up to date Clojure web docs

2014-07-08 Thread Andy Fingerhut
written in Ruby: https://github.com/zk/clojuredocs Andy On 8 July 2014 11:52, Andy Fingerhut wrote: > Mark, creating separate versions of the Clojure cheat sheet that link to > Grimoire instead of ClojureDocs.org should be fairly straightforward, but > due to other work I won'

Re: [ANN] Grimoire: up to date Clojure web docs

2014-07-08 Thread Andy Fingerhut
Mark, creating separate versions of the Clojure cheat sheet that link to Grimoire instead of ClojureDocs.org should be fairly straightforward, but due to other work I won't get to it for at least a few days. If someone else is interested, and not put off by my code, they are welcome to go for it a

Re: noob questions - Hello world + learning

2014-07-03 Thread Andy Fingerhut
In your example, [1 2 3 4 5] allocates and initializes a vector with the 5 elements 1 2 3 4 5. The first (def my-vec ...) also allocates a Var, and makes it 'point' at the vector [1 2 3 4 5]. When you do (assoc my-vec 2 "hello"), it looks up the current value pointed at by my-vec, which is the im

Re: guide on how to plug eastwood into clojure.test unittests?

2014-07-02 Thread Andy Fingerhut
Eastwood is a reasonable tool to consider for lint checking your files, IMNSHO. It is currently lacking a feature that would make it more useful as an automated step in a build/release process, which is the ability to disable particular warnings on very small sections of code. If such a feature i

Re: [ANN] Grimoire: up to date Clojure web docs

2014-07-01 Thread Andy Fingerhut
Zachary Kim has mentioned in an issue comment that he might be able to find time to update the source code and doc strings to Clojure 1.6.0, here: https://github.com/zk/clojuredocs/issues/66 I don't know when/if that will happen. Andy On Tue, Jul 1, 2014 at 7:12 PM, Daniel Compton wrote:

Re: Output of printf is buffered

2014-06-24 Thread Andy Fingerhut
It is an annoying behavior. I'm not sure it is a bug. If you wanted Clojure's printf to flush on every newline character it issues, it would have to somehow scan through the output stream of characters _after_ they have been formatted to see if there was a newline character anywhere in there, and

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-19 Thread Andy Fingerhut
Stefan, with the ~/.lein/profiles.clj you pasted: {:user {:plugins [[jonase/eastwood "0.1.4"] [cider/cider-nrepl "0.7.0-SNAPSHOT"]] }} I do not see the problem. If I change "0.1.4" to "0.1.2" I do. From earlier messages in this thread, that sounds consistent with your experie

Re: fn and let are special forms or macros?

2014-06-18 Thread Andy Fingerhut
user=> (source special-symbol?) (defn special-symbol? "Returns true if s names a special form" {:added "1.0" :static true} [s] (contains? (. clojure.lang.Compiler specials) s)) nil user=> (keys (. clojure.lang.Compiler specials)) (& monitor-exit case* try reify* finally loop* do letfn

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Andy Fingerhut
at 9:49 AM, Andy Fingerhut wrote: > Recommendation: If you see this problem, and you have Eastwood in your > ~/.lein/profiles.clj file, upgrade Eastwood to version 0.1.4, or go back to > Leiningen 2.3.4. > > More details: > > I have been able to reproduce an exception when ru

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Andy Fingerhut
Recommendation: If you see this problem, and you have Eastwood in your ~/.lein/profiles.clj file, upgrade Eastwood to version 0.1.4, or go back to Leiningen 2.3.4. More details: I have been able to reproduce an exception when running 'lein help new' outside of any Leiningen project in these condi

[ANN] Eastwood the Clojure lint tool version 0.1.4

2014-06-17 Thread Andy Fingerhut
f they arise due to the expansion of gen-class or comment macros. Issue #39 <https://github.com/jonase/eastwood/issues/39>. - Improved precision of :line and :column values in :unlimited-use warnings. Jonas Enlund, Nicola Mometto, and Andy Fingerhut -- You received this message

Re: Usage docstrings as example source & test samples

2014-06-16 Thread Andy Fingerhut
time to convince > them to write examples, perhaps import from clojuredocs first > (and discover a tool, what would parse them out and check them) > > BTW, I'm *highly interested* in these kind of things and *I'm surely > would start develop it if none would explored

Re: Usage docstrings as example source & test samples

2014-06-16 Thread Andy Fingerhut
I cannot answer for the Clojure core committers, but from past experience it seems unlikely that they will enhance the doc strings in the way you suggest. Fortunately, it is not true that "this decision must be taken by core committers". Anyone can add one dependency in Leiningen and replace all

Re: time expression of clojure produces different results on cascalog queries

2014-06-11 Thread Andy Fingerhut
There are some simple things like: try to ensure that no one else is using the systems being measured besides you, and even that you yourself are doing nothing with those systems other than the runs you are trying to measure. Measure what the load on the machines is before you start your experimen

Re: time expression of clojure produces different results on cascalog queries

2014-06-11 Thread Andy Fingerhut
I have not used Cascalog, so I do not know how much variation from one run to the next is completely normal, but there are many factors that can cause variations in run time between runs in most computations. For example: + the state of L1, L2, etc. caches in the CPU memory systems + If files are

Re: [ANN] Clojure cheatsheet with search capability

2014-06-09 Thread Andy Fingerhut
On Mon, Jun 2, 2014 at 6:54 AM, John Gabriele wrote: > On Sunday, June 1, 2014 5:15:52 PM UTC-4, Andy Fingerhut wrote: >> >> Thanks to Francois du Toit, the versions of the Clojure cheatsheet >> available at the link below now have the ability to let you search for all >

Re: Allow reseeding/rebinding RNG behind rand?

2014-06-03 Thread Andy Fingerhut
This ticket seems to be at least somewhat related to your questions: http://dev.clojure.org/jira/browse/CLJ-1420 Andy On Tue, Jun 3, 2014 at 11:32 AM, Mars0i wrote: > t appears that the random number generator for rand used can't be > reseeded, so there is no way to precisely repeat an ex

Re: stack backtraces for exceptions in agents?

2014-06-02 Thread Andy Fingerhut
Try out (clojure.repl/pst e 1000), where e is the exception you have caught. Andy On Mon, Jun 2, 2014 at 12:28 PM, Lee Spector wrote: > > In my single-threaded code, exceptions stop execution and print a stack > backtrace. This is less informative than I would like [1], but sometimes it > prov

Re: [ANN] Clojure cheatsheet with search capability

2014-06-02 Thread Andy Fingerhut
I'm open to a change like that. If anyone has a code change that would implement that, please let me know. Andy On Mon, Jun 2, 2014 at 6:54 AM, John Gabriele wrote: > On Sunday, June 1, 2014 5:15:52 PM UTC-4, Andy Fingerhut wrote: >> >> Thanks to Francois du Toit, the ver

[ANN] Clojure cheatsheet with search capability

2014-06-01 Thread Andy Fingerhut
Thanks to Francois du Toit, the versions of the Clojure cheatsheet available at the link below now have the ability to let you search for all symbols beginning with a string you type in, with color highlighting of matches. http://jafingerhut.github.io The one below is my favorite because you

[ANN] Eastwood the Clojure lint tool version 0.1.3

2014-06-01 Thread Andy Fingerhut
es" section of the documentation before filing problems. Several issues have already been discovered, and their causes documented, while testing Eastwood on most of the Clojure contrib libraries, Clojure itself, and over 35 other open source libraries. Go squash some bugs! Jonas Enlund,

Re: Help with a memory leak

2014-05-23 Thread Andy Fingerhut
I haven't looked into the details, but you might want to check out this Clojure ticket to see if it is related: http://dev.clojure.org/jira/browse/CLJ-1152 Andy On Fri, May 23, 2014 at 8:53 AM, Pablo Nussembaum wrote: > I have been working hard to understand the issue, and it seems to re

Re: Heidegger, literate programming, and communication

2014-05-22 Thread Andy Fingerhut
On Thu, May 22, 2014 at 11:05 AM, Tim Daly wrote: > >Tim, as someone already mentioned, the multi-page Java code you posted > from > >"the Clojure core" is actually one file from the Java ASM library, copied > >into the Clojure Github repository from one version of that library > >available from

Re: Heidegger, literate programming, and communication

2014-05-22 Thread Andy Fingerhut
On Wed, May 21, 2014 at 11:16 PM, u1204 wrote: > Heck, it is only 4 lines of C++. Why bother? *I* can read C++. I can > even reverse engineer it (probably by inventing the diagram in Figure > 2.7 on a napkin). Maybe it lives in the src/SamRecon/StratSam, which is > all the organization necessary

Re: Java API is copyright protected?

2014-05-11 Thread Andy Fingerhut
Tim, I am assuming you are aware of the non-Java Clojures called ClojureScript and Clojure on .NET. There are multiple other non-Java Clojure versions of varying degrees of completeness and polish. To my knowledge, they explicitly do not try to maintain compatibility at the Java API level -- Cloj

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-10 Thread Andy Fingerhut
It is pretty easy to make a library that modifies doc metadata on existing vars, e.g.: https://github.com/jafingerhut/thalia The time-consuming part, which I am nowhere near completing myself, is writing the alternate documentation strings. Congrats to anyone that produces something that bec

Re: Expected inconsistency between set and map w/ ArrayList?

2014-05-10 Thread Andy Fingerhut
On Sat, May 10, 2014 at 7:51 AM, John Hume wrote: > Thanks for the ticket pointer. I didn't find it in my initial search > because it "Affects Version/s: None" :-/, and I knew this behavior was new > to 1.6. > I changed Affects Version/s to Release 1.6 Whether that field is filled in for any pa

Re: Expected inconsistency between set and map w/ ArrayList?

2014-05-09 Thread Andy Fingerhut
Mike is correct. This change in behavior is due to the hashing changes in Clojure 1.6. See the comments on ticket http://dev.clojure.org/jira/browse/CLJ-1372 for some discussion of whether this is considered a bug. It appears that perhaps the hash consistency is not promised for mutable objects,

Re: Tag classes required to be imported?

2014-05-08 Thread Andy Fingerhut
Forgot to mention, the type tag should work without having to import it into the require'ing namespace if you fully qualify it where the tag is used. Andy On Thu, May 8, 2014 at 5:47 AM, Andy Fingerhut wrote: > This issue has been discovered before, at least in the contex

Re: Tag classes required to be imported?

2014-05-08 Thread Andy Fingerhut
This issue has been discovered before, at least in the context of the tools.analyzer library, and there was an ensuing discussion on the clojure-dev email list linked in the comments of this ticket: http://dev.clojure.org/jira/browse/TANAL-24 I do not recall whether there was a Clojure ticket

Re: Immutable or Effectively Immutable?

2014-05-07 Thread Andy Fingerhut
he details. > > Final field freeze is particularly weird and it baked my noodle when I > first encountered it - here's a blog I wrote about it approx 697 years ago > in internet time (and Brian Goetz backs me up in the comments :) > http://tech.puredanger.com/2008/11/26/

Re: Immutable or Effectively Immutable?

2014-05-07 Thread Andy Fingerhut
y pass objects between > threads. > > JCIP is a great book. But, the approach taken by Clojure makes a lot of > the complicated concerns covered by the book largely ignorable, IMHO. > > On Tuesday, May 6, 2014 8:35:43 PM UTC-4, Andy Fingerhut wrote: > >> Alex, I may be unf

Re: Immutable or Effectively Immutable?

2014-05-06 Thread Andy Fingerhut
Alex, I may be unfamiliar with the definitions of truly immutable and effectively immutable being used here, but if I can mutate the contents of a Java Object array that is a final field after an object is constructed, does it really matter that much if it is final? It is trivially easy to mutate

Re: Immutable or Effectively Immutable?

2014-05-06 Thread Andy Fingerhut
I haven't read JICP that you refer to, but I believe that they are effectively immutable. See a post by me in this thread titled "Clojure Concurrency and Custom Types" from March 2013 for how to stay within Clojure, but I believe requiring Java interop calls, to mutate in place Clojure's immutable

Re: Basic question: metadata reader

2014-05-03 Thread Andy Fingerhut
Note that if you try the same sequence you gave in your examples *without* metadata, you would get very similar results: (def one 1) one ;; evaluates to 1 bar ;; exception with message "Unable to resolve symbol: bar" The exception is because bar has not been def'd before. Andy -- You received

Re: clojure code to java

2014-04-30 Thread Andy Fingerhut
Leiningen can convert Clojure source code to Java .class files (compiled Java byte code, not Java source code), with the help of the Clojure compiler. I don't know of a way Leiningen can convert that to Java source code, unless there is some feature of Leiningen I haven't learned about yet, or som

Re: difference in behavior for :let modifiers in "for" vs. "doseq"

2014-04-30 Thread Andy Fingerhut
At least a few people consider it a bug, and two of them created a ticket, the first of which was declined as not a bug. That is some evidence that it is considered not a bug: http://dev.clojure.org/jira/browse/CLJ-1316 http://dev.clojure.org/jira/browse/CLJ-207 Andy On Wed, Apr 30, 20

Re: Strange dot behaviour

2014-04-27 Thread Andy Fingerhut
I believe you are hitting this issue, which was fixed in Clojure 1.6.0 http://dev.clojure.org/jira/browse/CLJ-1171 Andy On Sun, Apr 27, 2014 at 2:20 PM, Simon Doherty wrote: > We're encountering some strange behaviour with the instance? function. The > first two examples are expected behav

Re: (user/clojuredocs ...) gone from leiningen?

2014-04-25 Thread Andy Fingerhut
ersion to 2.3.3 and that should be all you need to go back. Andy On Fri, Apr 25, 2014 at 7:34 AM, Andy Fingerhut wrote: > I see that behavior, too, with Leiningen 2.3.4. > > It looks like this commit probably caused the change in behavior. I am > not sure of the motivation f

Re: (user/clojuredocs ...) gone from leiningen?

2014-04-25 Thread Andy Fingerhut
I see that behavior, too, with Leiningen 2.3.4. It looks like this commit probably caused the change in behavior. I am not sure of the motivation for this change to Leiningen: https://github.com/technomancy/leiningen/commit/c01fd49c836047f208d1db969b0490be2752c488 Andy On Fri, Apr 25, 2014 a

Re: Linked Hash Map/Set

2014-04-14 Thread Andy Fingerhut
hem: https://github.com/flatland/ordered https://github.com/amalloy/ordered Andy On Mon, Apr 14, 2014 at 12:36 PM, Andy Fingerhut wrote: > I don't have time right now to look at the details of your implementation, > but can answer at least one of your questions. > > Clojure

Re: Linked Hash Map/Set

2014-04-14 Thread Andy Fingerhut
I don't have time right now to look at the details of your implementation, but can answer at least one of your questions. Clojure's normal PersistentHashMap data structure does create a new object for every key you remove (with dissoc), add, or modify the value for (with assoc). So if a single as

Re: Clojure + BDD + TDD + Pairing...

2014-04-11 Thread Andy Fingerhut
I haven't used it myself, but noted that Alex Miller used http://ohours.orgfor allowing others to schedule meetings with him. Andy On Fri, Apr 11, 2014 at 9:08 AM, Timothy Washington wrote: > Hey Marcus, > > If you have Google Calendars, you can use that, and invite people to edit > a particula

Re: Using parallellisation

2014-04-10 Thread Andy Fingerhut
clojure_core/clojure.core/future Andy On Thu, Apr 10, 2014 at 4:35 PM, Cecil Westerhof wrote: > 2014-04-10 16:45 GMT+02:00 Andy Fingerhut : > > Forcing small bits of computation to be done in parallel using the tools >> Clojure and the JVM have at hand, e.g. pmap, future, etc., whic

Re: Using parallellisation

2014-04-10 Thread Andy Fingerhut
Forcing small bits of computation to be done in parallel using the tools Clojure and the JVM have at hand, e.g. pmap, future, etc., which rely on creating JVM Thread objects, tends to slow things down rather than speed things up, because the extra overhead of creating threads and waiting for them t

Re: clojure.core/Format Bug?

2014-04-06 Thread Andy Fingerhut
345")) returns 11, as you say, > which is correct. > > Am I looking at a LightTable bug then? > > > On Sunday, 6 April 2014 13:42:40 UTC-6, Andy Fingerhut wrote: > >> Paul, can you double-check the result you are getting from (format >> "'%-9s'&

Re: Composability of Clojure in math-heavy hot loops

2014-04-06 Thread Andy Fingerhut
wrote: > Shame on me! Now the difference is around 10%. Much better! > > Case closed, I suppose :) > > On Sunday, April 6, 2014 11:24:05 PM UTC+4, Andy Fingerhut wrote: > >> Sorry I am not taking the time to try out the change for you and see >> whether it makes the de

Re: clojure.core/Format Bug?

2014-04-06 Thread Andy Fingerhut
Paul, can you double-check the result you are getting from (format "'%-9s'" "12345") ? For example, wrap it in a call to count, i.e. (count (format "'%-9s'" "12345")). I get the expected string back from format, and the expected length of 11 characters, on all of these Clojure/JVM/OS combos I tes

Re: Composability of Clojure in math-heavy hot loops

2014-04-06 Thread Andy Fingerhut
Sorry I am not taking the time to try out the change for you and see whether it makes the desired difference in performance happen, but I do know that the ^double type hint on return values should be on the argument vector, not on the var. So instead of your abs-diff, try this, and similarly for a

[ANN] Eastwood the Clojure lint tool version 0.1.2

2014-04-03 Thread Andy Fingerhut
known issues in the README first. Jonas Enlund, Nicola Mometto, and Andy Fingerhut -- 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: Lazy evaluation

2014-04-01 Thread Andy Fingerhut
Back of the envelope meaning that you thought about the implementation and are estimating, or you have measurements? Either way, I agree that there are definitely use cases where non-lazy processing can give performance improvements. Probably even relatively common use cases. Cases where lazy se

Re: REPL: viewing data structures containing infinite lists

2014-04-01 Thread Andy Fingerhut
One argument for default value of *print-length* being nil: Plenty of people print Clojure data structures to files and later read them back in. The data would be corrupted if *print-length* was a too-small numeric value for your particular data. It might not be obvious until much later that you h

[ANN] Clojure cheat sheet (v13)

2014-03-27 Thread Andy Fingerhut
The version published at http://clojure.org/cheatsheet has been updated to the latest version, with new functions and macros added to Clojure 1.6 marked with (1.6) before them. There is a link near the top of that page "Download other versions with tooltips" that links to a page with several other

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-21 Thread Andy Fingerhut
That is odd. This is a shot in the dark, and probably unhelpful because I do not know a good way to verify whether my guess is true, but perhaps the seqFrom method went from being small enough to be inlined by your JIT before that change, to being too large to consider for inlining after the chang

Re: Perfect Functional Shuffle in Clojure

2014-03-20 Thread Andy Fingerhut
I haven't read all of your code, but note that the Haskell algorithm says it takes a sequence of random values where the first is in the range [0,n-1], the second in the range [0,n-2], third in [0,n-3], etc. Your repeatedly call here: https://github.com/pebrc/ninety-nine-clojure/blob/master/src/

Re: [ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Andy Fingerhut
dy refers to: #'clojure.core/record? in namespace: > clojure.tools.analyzer, being replaced by: > #'clojure.tools.analyzer.utils/record? > > We've had to disable :wrong-arity due to our use of java.jdbc / congomongo > but our code - including all our Expectations tests - is clea

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Andy Fingerhut
In case it isn't clear, I don't think such drastic changes could ever hope to be done in a reasonable time frame for Clojure 1.6.0. Probably better to have a different thread for this if there is interest in discussing it. Andy On Thu, Mar 20, 2014 at 10:03 AM, Andy Finge

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-20 Thread Andy Fingerhut
Regarding Michal's comment of using BST (binary search tree)-based dictionaries, Clojure does already have sorted-maps and sorted-sets that do this, for comparable keys/elements. A nice hybrid of the nearly-O(1) typical case of hash maps/sets, and simultaneously protecting against the cases where

[ANN] Eastwood 0.1.1 Clojure lint tool

2014-03-20 Thread Andy Fingerhut
ready been discovered, and their causes documented, while testing Eastwood on most of the Clojure contrib libraries, Clojure itself, and over 35 other open source libraries. Go squash some bugs! Andy Fingerhut -- You received this message because you are subscribed to the Google Groups "Clo

Re: Finding maximum weighted graph matchings

2014-03-18 Thread Andy Fingerhut
That is true for maximum matching (weighted or not) in bipartite graphs. Max (weighted) flow methods do not work for matchings in general graphs. Andy On Tue, Mar 18, 2014 at 9:31 AM, Jason Felice wrote: > I thought matching was a dual of max flow, so weighted matching was a dual > of min cos

Re: declare and def

2014-03-13 Thread Andy Fingerhut
The Clojure lint tool Eastwood (https://github.com/jonase/eastwood) uses this {:declared true} metadata to distinguish between a declare followed later by a def on the same var (no warning) from a def followed later by another def on the same var (when it issues a warning). declare is also an expl

Re: transient map bug?

2014-03-06 Thread Andy Fingerhut
What your code is doing is sometimes called "bashing transients in place". See some discussion here: http://clojuredocs.org/clojure_core/clojure.core/assoc! As explained there, you should always use the return value of assoc!, just as you would always use the return value of assoc. Andy On Thu,

<    1   2   3   4   5   6   7   8   9   10   >