Re: [ANN] Instaparse 1.1.0

2013-06-11 Thread Andy Fingerhut
Mark, I had not heard about Java changing the substring operation from O(1) to O(n). Do you have a link to any further info about this change? I'm guessing that the implementation is changing from the O(1) create a new String object that is a reference to a portion of the original String object

Re: [ANN] Instaparse 1.1.0

2013-06-11 Thread Andy Fingerhut
And to answer my own question about a reference for this change in behavior, which appears to have been made in Java 7: http://stackoverflow.com/questions/16123446/java-7-string-substring-complexity Andy On Tue, Jun 11, 2013 at 3:33 PM, Andy Fingerhut andy.finger...@gmail.comwrote: Mark

Re: sorted-map-by issue?

2013-06-06 Thread Andy Fingerhut
Your comparator #(if (= %1 %2) 0 1) may happen to give the correct answers for your example sorted-maps, but it is also a bad comparator that will fail for larger examples: user= (:a (sorted-map-by #(if (= %1 %2) 0 1) :z -26 :b 1 :a 2 :c 3 :m 13 :h 8)) nil user= (:z (sorted-map-by #(if (= %1 %2)

Re: sorted-map-by issue?

2013-06-06 Thread Andy Fingerhut
:02,Andy Fingerhut andy.finger...@gmail.com写道: Your comparator #(if (= %1 %2) 0 1) may happen to give the correct answers for your example sorted-maps, but it is also a bad comparator that will fail for larger examples: user= (:a (sorted-map-by #(if (= %1 %2) 0 1) :z -26 :b 1 :a 2 :c 3 :m 13

Re: Why aim for repeatability of specification / generative testing?

2013-06-06 Thread Andy Fingerhut
I've worked on hardware logic design, where the time and effort required to create good tests that find subtle bugs rivals the complexity of the hardware being designed itself. In this context, much of the testing has often been generated using pseudo-random streams similar to test.generative and

Re: java.lang.NoSuchMethodError: clojure.lang.RT.mapUniqueKeys

2013-05-27 Thread Andy Fingerhut
clojure.lang.RT.mapUniqueKeys was added to Clojure 1.5, and did not appear in 1.4 or earlier. It was added to Clojure 1.5 as part of this change: https://github.com/clojure/clojure/blob/master/changes.md#210-set-and-map-constructor-functions-allow-duplicates But yes, as Michael said, it means

Re: filter on sets ... [reward: me face palming]

2013-05-25 Thread Andy Fingerhut
If (map find-records query-parts) is returning this expression: (({:a2p-id 1, :dh-uuid abc-def-ghi-klm} {:a2p-id 2, :dh-uuid def-ghi-klm-opq} {:a2p-id 3, :dh-uuid nil}) ({:a2p-id 1, :dh-uuid abc-def-ghi-klm} {:a2p-id 2, :dh-uuid def-ghi-klm-opq} {:a2p-id 3, :dh-uuid nil})) then especially note

Re: filter on sets ... [reward: me face palming]

2013-05-25 Thread Andy Fingerhut
, Andy Fingerhut andy.finger...@gmail.comwrote: If (map find-records query-parts) is returning this expression: (({:a2p-id 1, :dh-uuid abc-def-ghi-klm} {:a2p-id 2, :dh-uuid def-ghi-klm-opq} {:a2p-id 3, :dh-uuid nil}) ({:a2p-id 1, :dh-uuid abc-def-ghi-klm} {:a2p-id 2, :dh-uuid def-ghi-klm-opq

Re: why is this behaving badly?

2013-05-24 Thread Andy Fingerhut
Try adding (flush) after the print call. On Fri, May 24, 2013 at 12:35 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: Hi everyone, I am trying to do something very simple like asking the user whether he wants to continue or not (a-la bash). However, sometimes the print statement is printed

Re: ClassNotfound Exception while loading JAR files in Clojure 1.2

2013-05-22 Thread Andy Fingerhut
I'll be more blunt than Sean was :-) Is there a reason why you *must* use Clojure 1.2? If so, what is it? If there isn't such a reason, you will likely get much better support from other Clojure users if you use Clojure 1.4 or 1.5.1 (1.5.1 was released a couple of months ago, so many are still

Re: Bug in transients: Cannot add more than 8 items to a transient map

2013-05-11 Thread Andy Fingerhut
What you are attempting to do is sometimes called bashing a transient in place. See these links for some discussion and examples: http://clojuredocs.org/clojure_core/clojure.core/assoc! http://clojuredocs.org/clojure_core/clojure.core/dissoc! Andy On Sat, May 11, 2013 at 3:51 PM,

Lisp 2013 summer programming contest

2013-05-06 Thread Andy Fingerhut
I have not heard of this before. Wanted to pass on the word in case anyone was interested in applying. $2000 grand prize, and a chance to speak at a conference about your project. http://lispinsummerprojects.org Andy -- -- You received this message because you are subscribed to the

Re: Now *there*'s a machine made for Clojure.

2013-04-28 Thread Andy Fingerhut
If the issue is that the GC implementation in Oracle's JVMs typically has a sequential bottleneck in it with default parameters, then yes, Amdahl's law is striking *for that GC implementation*. For problems that are embarassingly parallel (little or no communication or shared memory between

Re: Clojure on top of ObjC?

2013-04-23 Thread Andy Fingerhut
There may be more relevant or up-to-date links, but do a Google search for clojure objective c, and you will see this has been discussed a little bit in this group: https://groups.google.com/forum/?fromgroups=#!topic/clojure/6i9D5QOq7Cc Also, one person started a couple of projects on

Re: Multiple replacements in string using a map

2013-04-22 Thread Andy Fingerhut
on what's going on? Thanks Ray On Saturday, 20 April 2013 09:51:21 UTC+2, Mond Ray wrote: Just tried again - using lein repl (clojure 1.4.0) and it worked fine. It was late - who knows what I did ;-) Thanks for checking guys. On Saturday, 20 April 2013 02:37:14 UTC+2, Andy Fingerhut wrote

Re: Multiple replacements in string using a map

2013-04-19 Thread Andy Fingerhut
I fired up a Clojure 1.5.1 REPL, did (require '[clojure.string :as s]) first, then copied and pasted those two function definitions, and did not get the errors you are seeing. I don't have a good guess why you are getting those errors. Did you do the require first? What version of Clojure are

Re: Some docs on comparators, including mistakes to avoid, Clojure extended doc strings

2013-04-17 Thread Andy Fingerhut
A document that may perhaps contain more than most people want to know about Clojure = and == https://github.com/jafingerhut/thalia/blob/master/doc/other-topics/equality.md Andy On Thu, Apr 4, 2013 at 12:49 PM, Andy Fingerhut andy.finger...@gmail.comwrote: The document on comparator

Re: keyword bug

2013-04-15 Thread Andy Fingerhut
The description of legal symbols at http://clojure.org/reader could be somewhat more explicit on this. One could read it to mean that since :m/7 starts with an non-numeric m after the :, it is legal. One could also infer from it that since within namespace m you could not use :7 (since that

Re: Best way to (map) a sequence, but return 0-n items per input item?

2013-04-10 Thread Andy Fingerhut
Since you are dealing with maps, this might not be exactly what you need, but try it out and tweak it as needed: (mapcat f coll) = (apply concat (map f coll)) Andy -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: Disable undocumented #= reader macro to prevent unsafe code injection?

2013-04-09 Thread Andy Fingerhut
On Tue, Apr 9, 2013 at 10:03 AM, rebcabin bc.beck...@gmail.com wrote: The workarounds seem to be disabling or removing the #= reader macro or writing my own custom reader (in addition to a custom evaluator). Disabling #= by binding *read-eval* to false would cause an exception if such an

Re: Opinions on Equality Semantics

2013-04-08 Thread Andy Fingerhut
I think the general pattern here is equality being a function of _part_ of the value, but not all of it. For Clojure's = on lists/sequences/vectors, it is based upon the sequence of values, but not whether it is a list, sequence, or vector. For Perverse?'s equals it is quite explicit in its

Some docs on comparators, including mistakes to avoid, Clojure extended doc strings

2013-04-04 Thread Andy Fingerhut
I am seriously considering the idea of working on some extended doc strings for Clojure functions. Having only scratched the surface so far, I have learned that it could take a *lot* of hours to write such documentation for every function distributed as part of Clojure, at least if written in the

Re: Quirk with printing regexps

2013-03-31 Thread Andy Fingerhut
, 2013 at 6:36 PM, Andy Fingerhut andy.finger...@gmail.com wrote: (defn print-regex-my-way [re] (print #regex ) (pr (str re))) That might be closer to what you want. Yes. That does the trick. That extra level of converting the regular expression to a string does the trick because pr

Re: EDN syntax document contains an apparent omission.

2013-03-29 Thread Andy Fingerhut
Up at the top of the page you link to, there is a button labeled Issues (at least if you are logged in with a free-to-create Github account), and you can create an issue for this there. Andy On Fri, Mar 29, 2013 at 10:01 AM, Cedric Greevey cgree...@gmail.com wrote:

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
Look in the Clojure source, file LispReader.java, classes RegexReader and StringReader for the code that reads strings and regular expressions. Basically the difference for regular expressions is that since things like \d to match a single decimal digit, or \s to match a single whitespace

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
On Thu, Mar 28, 2013 at 5:15 PM, Mark Engelberg mark.engelb...@gmail.comwrote: On Thu, Mar 28, 2013 at 5:08 PM, Mark Engelberg mark.engelb...@gmail.comwrote: However, the first and last example print as: #a b Follow up question: Is there any way to make (re-pattern a\nb) print as

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
On Thu, Mar 28, 2013 at 5:49 PM, Mark Engelberg mark.engelb...@gmail.comwrote: I'm on 1.5.1 and I get that too, but even though: (pr #a\nb) prints in a sane, readable way (pr (re-pattern a\nb)) does not. The latter is what I need to print in a nice way. Sorry, I missed that fine point.

Re: Quirk with printing regexps

2013-03-28 Thread Andy Fingerhut
On Thu, Mar 28, 2013 at 6:23 PM, Mark Engelberg mark.engelb...@gmail.comwrote: On Thu, Mar 28, 2013 at 6:16 PM, Andy Fingerhut andy.finger...@gmail.comwrote: When you say a sane, readable way, do you mean human-readable, or readable via clojure.core/read or clojure.core/read-string? I

Re: JIT Compiler crash on IBM JDK 6

2013-03-26 Thread Andy Fingerhut
On Tue, Mar 26, 2013 at 5:21 AM, Paudi Moriarty pmoria...@annadaletech.comwrote: IBM JDK 6 is part of the clojure build matrix (though the last stable build is from over a year ago: http://build.clojure.org/job/clojure-test-matrix/jdk=IBM%20JDK%201.6/lastStableBuild/ ) I don't have any

Re: Clojure/West 2013 videos?

2013-03-25 Thread Andy Fingerhut
I would suggest that the finer points of economical video production and distribution be discussed further in another forum. I know we started out on Clojure, but have drifted fairly far afield for a while. Andy P.S.: It is OK to go to bed now. http://xkcd.com/386/ -- -- You received this

Re: Concurrency and custom types.

2013-03-24 Thread Andy Fingerhut
On Sun, Mar 24, 2013 at 11:04 AM, Jim - FooBar(); jimpil1...@gmail.comwrote: On 24/03/13 17:49, Shantanu Kumar wrote: In this case, making the type immutable is probably encouraged but not mandatory yes true, it's not enforced or anything like that, but I'd say it is more than just

Re: ClassNotFoundException: clojure.tools.logging.impl.LoggerFactory

2013-03-22 Thread Andy Fingerhut
Links to pages where you can file problem reports using JIRA, for Clojure and all of its contrib libraries (of which tools.logging is one) can be found here: http://dev.clojure.org/jira/secure/BrowseProjects.jspa#all You will need to create an account to be able to create a new ticket. Click

Re: contrib.monads doesn't compile?

2013-03-18 Thread Andy Fingerhut
clojure-contrib 1.2.0 probably still compiles reasonably well with Clojure 1.2.0, but since Clojure 1.3.0 support for the older contrib libraries has been gradually waning. http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go Andy On Mon, Mar 18, 2013 at 12:32 PM, Jim - FooBar();

Re: Raw strings

2013-03-18 Thread Andy Fingerhut
On Mon, Mar 18, 2013 at 12:48 PM, Marko Topolnik marko.topol...@gmail.comwrote: On Monday, March 18, 2013 8:37:19 PM UTC+1, Stefan Kamphausen wrote: this works pretty well, at least better than I expected, e.g.: user= (def r1 #(\s.)) #'user/r1 user= (def r2 #([abc])) #'user/r2 user=

Re: Clojure 1.5.0 bug (Java interop: Compiler.load(new StringReader(str));)

2013-03-13 Thread Andy Fingerhut
On Mar 12, 2013, at 9:41 PM, Taegyoon Kim wrote: But then(putting RT.init()), Compiler.load() works, but Console (stderr?) says No need to call RT.init() anymore So I think this problem should be fixed. 2013년 3월 13일 수요일 오전 11시 32분 5초 UTC+9, Andy Fingerhut 님의 말: Yegor Bugayenko

Re: Clojure 1.5.0 bug (Java interop: Compiler.load(new StringReader(str));)

2013-03-12 Thread Andy Fingerhut
Yegor Bugayenko posted in a comment on ticket CLJ-1172 ( http://dev.clojure.org/jira/browse/CLJ-1172) that calling RT.init() before Compiler.load() solved what looks like a similar problem for him. Andy On Tue, Mar 12, 2013 at 6:29 PM, Taegyoon Kim stelofl...@gmail.com wrote: A new error

Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Andy Fingerhut
There is clojure.data/diff, but whether it would work for you would depend on whether Clojure's = would compare your Java objects for equality in the way that you wanted. You could try it out on some test case to see. http://clojure.github.com/clojure/clojure.data-api.html#clojure.data/diff

Re: clojure.core/format localization problems

2013-03-09 Thread Andy Fingerhut
What OS and version of Java are you using (output of java -version, and if on Linux lsb_release -a and uname -a). Are you doing these commands one after another in a single REPL session? If so, how did you start that REPL? I've tried the commands you mention on these OS and JDK combos with

Re: features expression

2013-03-07 Thread Andy Fingerhut
I may be wrong, but I think this, and anything else that tries to solve this problem after read time, will fail for one of the primary uses of feature macros: Java packages/namespaces that exist for Clojure/JVM but not ClojureScript, and JavaScript namespaces that exist for ClojureScript but not

ANN: Clojure cheat sheet v9, including some new symbols from Clojure 1.5

2013-03-03 Thread Andy Fingerhut
http://jafingerhut.github.com Note that the doc strings in the tooltips, for those versions of the cheat sheet with tooltips, are from Clojure 1.5. While most doc strings remained the same from Clojure 1.4 to 1.5, a few have changed, and reflect new behavior in Clojure 1.5 that you cannot

Re: Unable to build Clojure 1.5

2013-03-01 Thread Andy Fingerhut
As noted in the readme.txt file: To build locally with Ant: One-time setup:./antsetup.sh To build: ant Clojure has a form of tail recursion using the recur form within loops and within functions, but it does not do tail calls unless you use the recur form. I do not

Re: Clojure equivalents of .indexOf .lastIndexOf

2013-02-28 Thread Andy Fingerhut
Although the cheat sheet is hosted on clojure.org, I'd hesitate a bit in inferring from its contents that .indexOf and .lastIndexOf are officially suggested options. More precise would be to say that when I was updating the cheatsheet a year ago to add many things that weren't already on

Re: Clojure Performance For Expensive Algorithms

2013-02-27 Thread Andy Fingerhut
On Feb 27, 2013, at 9:07 AM, Marko Topolnik wrote: On Wednesday, February 27, 2013 5:59:25 PM UTC+1, Isaac Gouy wrote: (defn blank? [s] (every? #(Character/isWhitespace %) s)) Have you ever wondered about its performance? No. Why would I wonder about the performance of a one line

Re: Clojure Performance For Expensive Algorithms

2013-02-26 Thread Andy Fingerhut
I've got a github repo with submissions for the Benchmarks Game web site for Java and Clojure, with several different Clojure programs for most problems: https://github.com/jafingerhut/clojure-benchmarks If people would like to submit what they consider idiomatic Clojure programs for any

Re: Clojure Performance For Expensive Algorithms

2013-02-24 Thread Andy Fingerhut
On Feb 24, 2013, at 8:46 AM, Marko Topolnik wrote: On Sunday, February 24, 2013 2:50:01 PM UTC+1, bernardH wrote: FWIW, I, for one, am really glad that Clojure allows us to select precisely which nice tools we want (have to) throw away (persistent data structures, dynamic typing,

Re: Clojure Performance For Expensive Algorithms

2013-02-24 Thread Andy Fingerhut
On Feb 24, 2013, at 9:33 AM, Marko Topolnik wrote: Take a look at any of the Common Lisp or Haskell submissions to the Computer Language Benchmarks Game web site, and you will see some programs that are nowhere near what people typically write in those languages, and certainly not what

Re: Clojure-CLR - Where to report issues?

2013-02-20 Thread Andy Fingerhut
I believe anyone should be able to create an account at this web site and then create a ticket. If you have any trouble doing so, let me know. http://dev.clojure.org/jira/browse/CLJCLR Andy On Feb 20, 2013, at 12:58 PM, Frank Hale wrote: I wanted to report an issue with Clojure-CLR

Re: Clojure Performance For Expensive Algorithms

2013-02-19 Thread Andy Fingerhut
^objects is a Clojure synonym for ^[Ljava.lang.Object;. Note that there are such synonyms for only a few Java types, not everything, e.g. there is no ^strings. What you are hinting is that a1 and a2 are Java arrays of objects. I think this might speed up (aget a1 i) expressions, since it is

Re: reflection used for (or ...) and (into-array ...)

2013-02-18 Thread Andy Fingerhut
Integer is a boxed integer in Java. It is a full Java Object. The java.awt.Color constructor you are calling takes 4 primitive int parameters, not Integer. Try this: (set! *warn-on-reflection* true) (def a 1) (java.awt.Color. (int 0) (int 0) (int (or a 0)) (int 0)) I'm not so sure what you

Re: Clojure Performance For Expensive Algorithms

2013-02-18 Thread Andy Fingerhut
This won't get you all of the way to Java speeds, or at least it didn't for me, but try these things: Use: (set! *warn-on-reflection* true) (set! *unchecked-math* true) The first won't speed anything up, but it will warn you about some things that are slow. The second will use unchecked

Re: interleave with one argument

2013-02-15 Thread Andy Fingerhut
There's a ticket requesting that enhancement: http://dev.clojure.org/jira/browse/CLJ-863 Andy On Feb 15, 2013, at 1:15 PM, Denis Washington wrote: Hi, I just solved the Replicate a Sequence problem on 4clojure [1] using interleave. However, I noticed that interleave cannot be called

Re: Why is this so difficult?

2013-02-15 Thread Andy Fingerhut
Jules: Did you see this page on clojure-doc.org before? http://clojure-doc.org/articles/tutorials/eclipse.html I don't know if it covers any of the difficulties you found, or documents anything that you'd like to see documented, but Michael Klishin and others that maintain clojure-doc.org

Re: Google Summer of Code 2013

2013-02-15 Thread Andy Fingerhut
I don't know if it would be within the scope of what GSoC would be interested in funding, or if anyone would be interested in doing it, but from some of the messages in the Why is it so hard? thread, there are people interested in seeing Clooj stay up to date and maintained. Andy On Feb 14,

Re: RC 16: Last chance to test against Clojure 1.5 before it ships

2013-02-15 Thread Andy Fingerhut
Eric: 1 was a result of a change made by choice: https://github.com/clojure/clojure/blob/master/changes.md#210-set-and-map-constructor-functions-allow-duplicates The ticket linked there has a link to a design page on it, which in turn has a link to an earlier discussion thread on the

Re: new, macros and Can't eval locals

2013-02-14 Thread Andy Fingerhut
On Feb 14, 2013, at 1:27 PM, AtKaaZ wrote: The goal is to can write this form: = (let [a java.lang.RuntimeException] (new a) ) CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: a, compiling:(NO_SOURCE_PATH:2:3) attempt with macro: =

Re: ANN: NEVER use clojure.core/read or read-string for reading untrusted data

2013-02-13 Thread Andy Fingerhut
On Feb 12, 2013, at 1:46 PM, Phil Hagelberg wrote: Andy Fingerhut writes: Examples of dangerous side effects that can occur with clojure.core/read and read-string in Clojure 1.4 and earlier: ;; This causes precious-file.txt to be created if it doesn't ;; exist, or if it does exist, its

Re: ANN: NEVER use clojure.core/read or read-string for reading untrusted data

2013-02-12 Thread Andy Fingerhut
On Feb 12, 2013, at 9:57 AM, Phil Hagelberg wrote: Andy Fingerhut writes: It isn't just clojure.core/read executing code that can consume CPU cycles that is the issue, it is clojure.core/read executing code that can wreak havoc with your system and allow attackers to gain remote control

ANN: NEVER use clojure.core/read or read-string for reading untrusted data

2013-02-11 Thread Andy Fingerhut
Following up on the thread *read-eval* vulnerability, I started writing some documentation for how to read Clojure data safely. That isn't ready yet, but before I get the time to finish that I wanted to quickly get out a warning that is obvious to some, but probably not all: NEVER use

Re: ANN: NEVER use clojure.core/read or read-string for reading untrusted data

2013-02-11 Thread Andy Fingerhut
And just in case it gets edited by someone else before you have a chance to read it, I've copied and pasted the current version below for reference. Correction/comments/questions all welcome. On Feb 11, 2013, at 10:29 AM, Andy Fingerhut wrote: Following up on the thread *read-eval

Re: ANN: NEVER use clojure.core/read or read-string for reading untrusted data

2013-02-11 Thread Andy Fingerhut
11, 2013 at 7:32 PM, Andy Fingerhut andy.fi...@gmail.com wrote: And just in case it gets edited by someone else before you have a chance to read it, I've copied and pasted the current version below for reference. Correction/comments/questions all welcome. On Feb 11, 2013, at 10:29 AM, Andy

Re: how to automatically and idiomatically add newlines to clojure code in emacs

2013-02-11 Thread Andy Fingerhut
On Feb 11, 2013, at 6:28 PM, John Fries wrote: How are people currently handling this situation? Is it part of most people's clojure/emacs workflow to 1) Just insert the newlines by hand? (perhaps I'm the only one finding this repetitive) I find inserting newlines by hand less repetitive

ClojureScript group up to 150 members

2013-02-10 Thread Andy Fingerhut
That is nowhere near the Clojure group's 7000+ members, but it is a good start for only existing since Jan 23. Don't worry, I won't mention its existence here every 2 weeks. I will in another 6 months or so, as a note to any new Clojure group members who are especially interested in

Re: clojure.set/intersection can't cope with infinite sets

2013-02-06 Thread Andy Fingerhut
clojure.set/intersection is documented to work on input sets. In Clojure, all sets are finite. (range) is a lazy sequence, which isn't a set. You could attempt to make a set out of it with (set (range)), but that won't work because it will try to consume the entire unending sequence. I

Re: Possible bug in clojure.java.jdbc

2013-02-05 Thread Andy Fingerhut
You can create a ticket for java.jdbc here if you wish that describes the problem and what you think will fix it. Then any of the 500+ Clojure contributors can take a shot at fixing it: http://dev.clojure.org/jira/browse/JDBC Andy On Feb 5, 2013, at 7:07 PM, a...@bitlimn.com wrote: Hey

Re: Inflection on clojure.java.io/reader and writer

2013-02-04 Thread Andy Fingerhut
can't be resolved. Reflection warning, NO_SOURCE_PATH:29 - reference to field newLine can't be resolved. Reflection warning, NO_SOURCE_PATH:20 - reference to field newLine can't be resolved. Thanks! On Sunday, February 3, 2013 4:38:38 PM UTC-5, Andy Fingerhut wrote: Can you post

Re: Inflection on clojure.java.io/reader and writer

2013-02-03 Thread Andy Fingerhut
Can you post a larger chunk of code for us to examine, perhaps on github or as a gist if it is over 30 lines of code or so? Many of us have had good success with eliminating reflection using type hints, so it should be possible to make it work. Andy On Feb 3, 2013, at 12:50 PM, Kanwei Li

Re: Execute a subprocess that takes input e.g. emacs

2013-02-03 Thread Andy Fingerhut
I was able to open an X windows emacs session using: (require '[clojure.java.shell :as sh]) (sh/sh emacs) on my system. The REPL did not give another prompt until I quit that emacs invocation. I was able to get another REPL prompt immediately using this: (future (sh/sh emacs))

Re: How to read a txt file?

2013-02-01 Thread Andy Fingerhut
Roger, tryclj.com is limited in what it can do. The Clojure code you type in there is running on the web server across the network from you, not on your own local machine. That file isn't accessible there. Also for that reason many symbols are not allowed to be used in tryclj.com

Re: *read-eval* vulnerability

2013-01-30 Thread Andy Fingerhut
This isn't what you are asking, but I wanted to make a comment that there is a proposed patch to Clojure attached to ticket CLJ-904 that adds warnings to read and read-string about how their behavior depends upon the value of *read-eval*: http://dev.clojure.org/jira/browse/CLJ-904 Also,

Re: *read-eval* vulnerability

2013-01-30 Thread Andy Fingerhut
Out of curiosity, I made a patch to Clojure that causes the default value of *read-eval* to be false instead of true, to see if any of the tests pass, and to let other people try it out in case it breaks things that would be surprising and/or disruptive. It is attached to this new ticket:

Re: No doseq inside finally?

2013-01-30 Thread Andy Fingerhut
Bug fixed in the forthcoming Clojure 1.5: http://dev.clojure.org/jira/browse/CLJ-667 % java -cp clojure.jar clojure.main Clojure 1.5.0-master-SNAPSHOT user= (try nil (finally (doseq [x (range 10)] (println x 0 1 2 3 4 5 6 7 8 9 nil Andy On Jan 30, 2013, at 8:42 AM, nick rothwell

Re: abysmal multicore performance, especially on AMD processors

2013-01-30 Thread Andy Fingerhut
Josiah mentioned requesting a free trial of the ZIng JVM. Did you ever get access to that, and were able to try your code running on that? Again, I have no direct experience with their product to guarantee you better results -- just that I've heard good things about their ability to handle

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-27 Thread Andy Fingerhut
On Jan 20, 2013, at 7:11 PM, Andy Fingerhut wrote: On Jan 20, 2013, at 7:49 AM, Anthony Grimes wrote: In closing, I propose the following. If we're going to continuously deny people things they are accustomed to, instead of treating them like angry children having tantrums, why don't we get

Re: Macro with odd behavior

2013-01-26 Thread Andy Fingerhut
I do not know exactly what is going on, but suspect it is something to do with conversion between float and double (or Java Float and Double). Try replacing the argument 19.1 with each of these possibilities, and you should see what I mean: (double 19.1) (Double. 19.1) (float 19.1) (Float

Re: CollReduce and IKVReduce for nil?

2013-01-25 Thread Andy Fingerhut
CLJ-1098 fix committed to Clojure master today as part of 1.5.0-RC3: http://build.clojure.org/job/clojure/changes Andy On Jan 14, 2013, at 4:24 AM, Wolodja Wentland wrote: On Sat, Jan 12, 2013 at 08:15 -0800, Andy Fingerhut wrote: The CLJ-1098 ticket was categorized as a minor

Call for volunteers to help moderate a ClojureScript Google group

2013-01-23 Thread Andy Fingerhut
An interest was expressed by a few in having a separate ClojureScript mailing list. If it is a Google group, that requires moderating messages sent to the group, via manual approval. I suspect early on there will be many people posting to the group for the first time that have long worked

ANN: New ClojureScript Google group

2013-01-23 Thread Andy Fingerhut
., then it is not welcome on the ClojureScript group. Please send it to the Clojure group instead. If it is not specific to any one flavor of Clojure, but you prefer to send it to the ClojureScript group, go right ahead, but realize that your audience may be smaller than if you send it to the Clojure group. Andy

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-21 Thread Andy Fingerhut
Michael, I would also love it if bugs got fixed in master more quickly. I've done some things to try to make that happen, but for all I know I've only exacerbated the issue. I'm still searching for ways to improve that. One thing I know at the base of all such suggestions is: I am not going

Re: Decoupling documentation from code?

2013-01-21 Thread Andy Fingerhut
On Jan 21, 2013, at 4:31 PM, Rich Morin wrote: On Jan 21, 2013, at 12:20, Andy Fingerhut wrote: If one wanted *slightly* more editorial control of what appeared in those doc strings, they could publish a not-very-large file of new improved doc strings and make a macro like doc and cdoc

Re: Decoupling documentation from code?

2013-01-21 Thread Andy Fingerhut
Yes, those things can happen, but I think they can all be handled without big troubles. Note that Rich Morin specifically mentioned using something like codeq to notice when particular functions change, and thus their documentation bears re-examining. diff also works, at a file granularity

Clojure integration testing

2013-01-20 Thread Andy Fingerhut
There currently is such testing of patches submitted to Clojure, which I've implemented with some Clojure programs I've cooked up. It tests all patches attached to Clojure JIRA tickets to see if they apply cleanly and whether the code compiles and passes existing unit tests. I've been

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-20 Thread Andy Fingerhut
On Jan 20, 2013, at 7:49 AM, Anthony Grimes wrote: In closing, I propose the following. If we're going to continuously deny people things they are accustomed to, instead of treating them like angry children having tantrums, why don't we get a response from clojure/core and have it

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Andy Fingerhut
On Jan 18, 2013, at 3:52 PM, Sean Corfield wrote: On Fri, Jan 18, 2013 at 1:33 PM, Andy Fingerhut andy.finger...@gmail.com wrote: The issue that Clojure, its contrib libraries, and ClojureScript do not accept github pull requests has been brought up several times before on this email list

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-19 Thread Andy Fingerhut
Irakli: I am curious about the possibility of auto-creating patches from git pull requests, in case that would bridge the divide between people that would prefer submitting pull requests, and Clojure screeners that would prefer evaluating patches and JIRA tickets. Causing a new git pull

Re: Unexpected failure (split function)

2013-01-18 Thread Andy Fingerhut
This issue appears to be unique to using a Leiningen version 2 REPL. It does not occur if using java -cp clojure.jar clojure.main to get a REPL, nor with Leiningen version 1.7.1. CCing nrepl developer Chas Emerick in case this might be an issue with nrepl, but I haven't attempted to localize

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Andy Fingerhut
The issue that Clojure, its contrib libraries, and ClojureScript do not accept github pull requests has been brought up several times before on this email list in the past. Feel free to search the Google group for terms like pull request. Short answer: Rich Hickey prefers a workflow of

Re: Unexpected failure (split function)

2013-01-18 Thread Andy Fingerhut
is affected, though. - Chas On Jan 18, 2013, at 3:13 PM, Andy Fingerhut wrote: This issue appears to be unique to using a Leiningen version 2 REPL. It does not occur if using java -cp clojure.jar clojure.main to get a REPL, nor with Leiningen version 1.7.1. CCing nrepl developer Chas

Re: clojure.pprint wiki pages, for review

2013-01-17 Thread Andy Fingerhut
Looks nice. Have you considered submitting pages like these to the clojure-doc.org site? I don't know if Michael Klishin would be interested in this material, but it certainly wouldn't be out of place there if he was willing to take it. There is a much shorter list of examples here that I

Re: is org.clojure/java.jdbc part of the official clojure

2013-01-15 Thread Andy Fingerhut
java.jdbc is one of several Clojure contrib libraries, others of which you can see listed in the two places below: https://github.com/clojure http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go They are like Clojure in that they are released under the same Eclipse Public

Re: CollReduce and IKVReduce for nil?

2013-01-12 Thread Andy Fingerhut
I have no inside information on whether it is an oversight or a conscious design decision, but there are other possibilities besides those two. The CLJ-1098 ticket was categorized as a minor enhancement when it was created. Defects (i.e. bugs) are considered with higher priority. Also Clojure

Re: clojure.core/ns documentation glitch?

2013-01-10 Thread Andy Fingerhut
Ticket with patch submitted: http://dev.clojure.org/jira/browse/CLJ-1143 Andy On Jan 10, 2013, at 10:49 AM, Stuart Sierra wrote: yes On Wednesday, January 9, 2013 11:32:41 AM UTC-5, wujek@gmail.com wrote: The documentation of clojure.core/ns says nearly to the end of its

Re: All the ways to define metadata (and ^:static)

2013-01-09 Thread Andy Fingerhut
On Jan 9, 2013, at 12:37 AM, wujek.sru...@gmail.com wrote: Hi. I am currently learning clojure, which is a nice experience, but you all know that. I have question about certain metadata definitions, which I couldn't find a straight answer to on the net, and in none of the books I'm

Re: All the ways to define metadata (and ^:static)

2013-01-09 Thread Andy Fingerhut
Is there any chance a patch to remove all the obsolete :static keywords from Clojure's core.clj would be accepted? Or perhaps there isn't much point in doing so? I've removed :static as an example keyword in the Metadata section of the latest Clojure cheatsheet published here:

Re: Suggestion: add `into` on clojure.org/data_structures page

2013-01-06 Thread Andy Fingerhut
For most of the documentation on clojure.org, only a few people have authorization to modify it. You could create a JIRA ticket suggesting a change here: http://dev.clojure.org/jira/browse/CLJ Such tickets can take anywhere from a few days to many months before someone acts upon them,

Re: if-let/when-let

2013-01-04 Thread Andy Fingerhut
I don't know the history of the answer to why, except perhaps as hinted by Evan's answer, which is that it becomes implicit how to combine the results of the multiple values to get the final true/false for the if condition. You imply and, which is a perfectly reasonable choice. My main reason

Re: Clojure 1.5.0 RC 1

2013-01-02 Thread Andy Fingerhut
: On Sun, Dec 23, 2012 at 12:45:50PM -0800, Andy Fingerhut wrote: Are there no other RPMs that require Internet access to complete their build? e.g. no others that use Maven to pull in dependencies before building? Dependencies should be solved by the specification of BuildRequires

Re: Clojure 1.5.0 RC 1

2013-01-02 Thread Andy Fingerhut
On Dec 23, 2012, at 8:50 AM, Peter Taoussanis wrote: Were any breaking changes made between alpha3 and RC1? I haven't spent much time trying to track down causes so it's very possible I'm mistaken, but I seem to be running into some weird behavior under RC1. Specifically, seem to be

Re: Building a WHERE IN clause

2012-12-31 Thread Andy Fingerhut
interpose and str should still work, but clojure.string/join might be slightly more concise. Andy On Dec 31, 2012, at 2:00 PM, Jonathon McKitrick wrote: I found an older article from Oct 2011, but what is currently the best way to build a statement like this? [select question_id,

Re: reduce-kv incompatible with subvec

2012-12-29 Thread Andy Fingerhut
, Dec 28, 2012 at 11:23 PM, Andy Fingerhut andy.finger...@gmail.com wrote: I am not saying that one would *have* to give up O(1) subvec in order to support other operations. I am guessing, without having done a thorough analysis, that an O(log n) subvec based on RRB Trees would make most

Re: Will the JVM will always likely, remain the primary Clojure implementation ?

2012-12-29 Thread Andy Fingerhut
If you don't get a flood of responses, I think it is because in this thread and the one linked earlier that Leon Adler started, several different people have explained evidence that Clojure on the JVM has had active development for five years, it is open source, and no one knows of any evidence

<    1   2   3   4   5   6   7   8   9   >