Re: unexpected behavior catching exceptions within a go block

2014-10-28 Thread Chris Perkins
On Monday, October 27, 2014 9:25:30 PM UTC-6, Wei Hsu wrote: This gist illustrates a problem I'm having where the channel is closed after running into an exception, even if I put a try/catch block around the block that generates the exception:

Re: [Large File Processing] What am I doing wrong?

2014-01-21 Thread Chris Perkins
On Monday, January 20, 2014 11:55:00 PM UTC-7, Jarrod Swart wrote: I'm processing a large csv with Clojure, honestly not even that big (~18k rows, 11mb). I have a list of exported data from a client and I am de-duplicating URLs within the list. My final output is a series of vectors:

[Job Spam] Write Clojure at Rally Software in Boulder, Colorado

2014-01-01 Thread Chris Perkins
Clojure yet, but does a good job of selling you on the many benefits of working here: https://www.rallydev.com/careers/open-positions Feel free to email me off-list with questions, or send me your resume and I'll get it into the right hands. - Chris Perkins chrisperkin...@gmail.com

Re: much lower recursion depth with memoization

2013-09-23 Thread Chris Perkins
, but from apply, which appears to use a relatively enormous amount of stack space. I suspect that since AFn.applyToHelper dispatches on up to 20 arguments, that stack space for all 20 is always used, even if you only pass, say, one argument. - Chris Perkins -- -- You received this message

Re: XML namespace parsing - any movement?

2013-09-19 Thread Chris Perkins
into a patch for data.xml, you are certainly welcome to do so. Having put in the work, I would love to see this code get into a state where it could actually be useful to someone. Unfortunately, I don't anticipate having much time to do so myself in the near future. - Chris Perkins -- -- You received

Re: why can I re-use local variables if Clojure is immutable?

2013-04-03 Thread Chris Perkins
On Tuesday, April 2, 2013 1:09:25 PM UTC-6, larry google groups wrote: If Clojure is suppose to emphasize immutability, why can I do this: kiosks-clojure.core= (let [ #_= mega (+ 1 1) #_= mega (+ 1 mega) #_= mega (+ 1 mega)

Re: seeking namespace-aware xml lib

2012-07-17 Thread Chris Perkins
run out of memory parsing large documents. Also, I did some perf testing and found it to be quite slow, but I never found time to investigate why. I hope it's useful to you. - Chris Perkins -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Memory issues processing large lazy sequences

2012-06-08 Thread Chris Perkins
On Thursday, June 7, 2012 1:53:30 PM UTC-4, Tom Hume wrote: Hi I'm trying to generate a sequence which corresponds to a breadth-first search of a very wide, deep tree... and I'm hitting memory problems when I go too far along the sequence. Having asked around on the IRC channel and

Re: Parallel doseq?

2012-05-24 Thread Chris Perkins
(doall (pmap ...)) nil). Apparently doall has a two-arg version, which is news to me :) - Chris Perkins -- 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

Re: Pulling constants out of interfaces

2012-05-01 Thread Chris Perkins
On Monday, April 30, 2012 12:19:00 PM UTC-4, Philip Potter wrote: Note that, even though this works, $ is not a valid character in a clojure symbol. See http://groups.google.com/group/clojure/browse_thread/thread/5af5d892f2e84212/0c5dc6b6a1578f07?#0c5dc6b6a1578f07 and

Re: Getting started with lein-cljsbuild

2012-04-19 Thread Chris Perkins
On Thursday, April 19, 2012 3:03:53 AM UTC-4, Evan Mezeske wrote: That's great news that you got it to work. I can't make any sense of the stack trace you're seeing with lein deps, though, unfortunately. Other than installation, does the plugin seem to work (e.g. lein cljsbuild once,

Re: newline question

2012-02-07 Thread Chris Perkins
http://stackoverflow.com/questions/8707679/how-to-get-suppress-m-characters-in-my-clojurebox-emacsw32-repl-connected-to -- 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

Re: Creating parsers in clojure

2012-02-03 Thread Chris Perkins
There is an example of parser for a very small subset of SQL in one of the unit tests for imparsonate, here: https://github.com/grammati/imparsonate/blob/master/test/imparsonate/test/core.clj - Chris -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: Looking for parser generator library

2012-01-28 Thread Chris Perkins
Here is one I wrote a while ago. https://github.com/grammati/imparsonate It's not finished (is open-source software ever really finished?), so I don't know whether it will do what need it to. - Chris -- You received this message because you are subscribed to the Google Groups Clojure group.

Re: ClojureScript def, vars, and binding

2012-01-27 Thread Chris Perkins
You should be calling Thread.start in the clojure version, not Thread.run. Your set-timeout is just blocking for a while and then running the passed-in function on the caller's thread. - Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Implementing an interface with core/proxy results in UnsupportedOperationException

2012-01-23 Thread Chris Perkins
You may want to dig a little deeper into why reify was not working for you. As far as I can tell, the classes created by reify do have a public, no-arg constructor, as you require: user (- (reify Runnable (run [_])) type .getConstructors seq) (#Constructor public

Pretty-print with metadata

2012-01-20 Thread Chris Perkins
Is there a way to pretty-print an object with its metadata? If I (set! *print-meta* true) at the REPL, I can see the metadata. If I use (pprint thing), I can see the structure much more easily. How can I do both? - Chris -- You received this message because you are subscribed to the Google

Re: Pretty-print with metadata

2012-01-20 Thread Chris Perkins
Thanks Meikel. So I guess from your reply that there is no built-in way to do this, right? The objects I'm trying to inspect can be deeply nested maps and vectors, and I want to see all the metadata - not just on the root object. I guess I would have to either re-implement some of the logic

Re: Pretty-print with metadata

2012-01-20 Thread Chris Perkins
By looking at pprint.clj, I have come up with something that seems to work. No hacking is necessary - the code in pprint is impressively clear and extensible. It's obviously designed to allow exactly this sort of extension to the printing mechanism. user (defn ppm [obj] (let

Re: Pretty-print with metadata

2012-01-20 Thread Chris Perkins
Good catch! I was about to add this to my personal toolkit of generally useful random crap (every programmer has one of those, right?). I'll make sure to cover that edge-case. Thanks. - Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Proxies and overriding protected methods

2012-01-16 Thread Chris Perkins
Norman, Finalize is a protected method, so you can't call it. You get the same error trying to call finalize on anything - it has nothing to do with proxy. user (.finalize (Object.)) No matching field found: finalize for class java.lang.Object - Chris -- You received this message because

Re: Proxies and overriding protected methods

2012-01-16 Thread Chris Perkins
On Monday, January 16, 2012 6:12:34 AM UTC-5, Chris Perkins wrote: Norman, Finalize is a protected method, so you can't call it. You get the same error trying to call finalize on anything - it has nothing to do with proxy. user (.finalize (Object.)) No matching field found: finalize

Re: Can't get the debugger cdt run

2011-12-03 Thread Chris Perkins
On Saturday, December 3, 2011 12:16:43 AM UTC-5, Sean Corfield wrote: On Fri, Dec 2, 2011 at 12:37 PM, George Jahad clo...@blackbirdsystems.net wrote: The easiest way to use cdt is from emacs, as described here: http://georgejahad.com/clojure/swank-cdt.html Could you add a note to clarify

Re: Can't get the debugger cdt run

2011-12-03 Thread Chris Perkins
I realize now that I just pasted the warning, but I was getting a class loading exception too. I seem to have solved it with this, in my project.clj: :extra-classpath-dirs [/usr/lib/jvm/java-6-sun/lib/tools.jar] I still get the warning, but it works now. Thanks Edmund. - Chris -- You

Re: How to attach debugger on clojure's repl ?

2011-12-03 Thread Chris Perkins
On Friday, September 23, 2011 8:00:36 AM UTC-4, Sam Aaron wrote: I'd be very happy to write up a Getting Started tutorial on the ritz wiki if I can get things working. Sam (two months later) Not to publicly shame you or anything, Sam, but... how's that tutorial coming along? :)))

Re: How to attach debugger on clojure's repl ?

2011-12-03 Thread Chris Perkins
On Saturday, December 3, 2011 9:50:21 AM UTC-5, Sam Aaron wrote: I never did manage to get ritz working. I believe the issue was with ritz - cake (I still use cake for Overtone hacking). However, now that cake and lein are going to be united, we can just focus on lein support for the

Re: delayed recursive macro expansion?

2011-12-03 Thread Chris Perkins
You should be able to just change your macro to a function, remove the backtick, and change (try ~expr ...) to (try (eval expr) ...). - Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: noob question about error with tail recursion

2011-11-30 Thread Chris Perkins
(recur (rest lista) ...) here: ^^^ lista is always the same thing. You probably meant (recur (rest rst) ...). - Chris -- 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

Re: [ANN] Avout: Distributed State in Clojure

2011-11-29 Thread Chris Perkins
Wow. It will take a while to digest this before I can even dream of what possibilities this opens up. In the meantime, a couple of simple questions: 1) On the avout.io site, is the diagram of conflicting transactions correct? It looks to me like the red arrow is in the wrong place (and it

Re: Error running Clojure 1.3 on OSX 10.6.8

2011-11-28 Thread Chris Perkins
It looks like those instructions are a bit out of date. The download does not contain a clojure.jar - it contains clojure-1.3.0.jar. Just put that after -cp, and it should work. - Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Drift 1.4.0 released.

2011-11-27 Thread Chris Perkins
My guess would be a clojure version mismatch, based on the stacktrace. Have you tried changing your project to use clojure 1.2.1? - Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com

Re: Can't build clojure cloned from github - 2 tests failed - when running from cygwin

2011-11-22 Thread Chris Perkins
I suspect that Windows users are a minority here, and cygwin users are a minority of that minority :) So I'm sure that help with maintaining cygwin compatibility would be appreciated. You should start by sending a contributor agreement: http://clojure.org/contributing - Chris -- You

Re: Can't build clojure cloned from github - 2 tests failed - when running from cygwin

2011-11-21 Thread Chris Perkins
On Monday, November 21, 2011 9:27:00 AM UTC-5, Michael Jaaka wrote: now as tutorial on https://github.com/technomancy/clojure-mode states used: M-x run-lisp and got Searching for program: no such file or directory, lisp any help? Try using the instructions from the next section of

Re: Can't build clojure cloned from github - 2 tests failed - when running from cygwin

2011-11-21 Thread Chris Perkins
In a project just means that the active buffer in emacs is a file under the project root. When you do clojure-jack-in, it will start from the current file's directory, and look up through parent directories until it finds a project.clj file. -- You received this message because you are

Re: Can't build clojure cloned from github - 2 tests failed - when running from cygwin

2011-11-21 Thread Chris Perkins
I'm far from being an expert on this stuff, but I did go through all the same frustration as you are going through, about 2 years ago, so I'll try to help. I think you have an old version of clojure-mode. The default archive that comes with package.el is at http://tromey.com/elpa. It

Re: Can't build clojure cloned from github - 2 tests failed - when running from cygwin

2011-11-21 Thread Chris Perkins
On Monday, November 21, 2011 11:27:04 AM UTC-5, Michael Jaaka wrote: Then I entered into Clojure project, used: M-x clojure-jack-in (almost there!!!) And got exception: Unable to resolve symbol print-doc. LOL :-) Any suggestions? Do you have the latest version of swank-clojure? Look in

Re: Review my code - delay-map

2011-11-18 Thread Chris Perkins
Meikel, That's very helpful. You and I took essentially the same approach - wrap a real map and delegate most operations to it. You used deftype, which I was afraid to try because there seemed to be too many interfaces and too many methods to implement, so I used proxy and APersistentMap to

Review my code - delay-map

2011-11-17 Thread Chris Perkins
not use :session do not pay the cost of loading it. Anyway, that's just the example that motivated the idea. Whether it turns out to be useful in practice remains to be seen. thanks, - Chris Perkins -- You received this message because you are subscribed to the Google Groups Clojure group

Re: How do I store/read data with function references in it?

2011-11-11 Thread Chris Perkins
It looks like your (:foo d) is a symbol. ((:foo d) 4 5) is trying to look itself up as a key in the map you provided, which is 4. Since that's not a map, the lookup fails and it returns the default value you provided: 5. It's very forgiving that way :) As for your main question, about how to

Re: Open source Clojure projects

2011-11-09 Thread Chris Perkins
There are lots. You could start browsing from here: https://github.com/languages/Clojure - Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are

Re: Problem passing a function into a function

2011-11-03 Thread Chris Perkins
The problem is that inside your timed-agent function, test-func is not a function - it is a one-element sequence containing your test function. That's what using in the arguments vector does. Try it like this: (defn timed-agent [limit timed-func [test-func]] ...) - Chris -- You received

Re: Code problem: setting an atom from a deref'd atom that's inside a let.

2011-10-25 Thread Chris Perkins
On Tuesday, October 25, 2011 12:00:04 PM UTC-4, Tim Robinson wrote: This code probably will not make a whole lotta sense since I reduced it down to show only the problem at hand, but I'm hoping someone can explain why this doesn't work the way I expected it would: = (def data (atom {:k1

Re: Clojure 1.3 treatment of integers and longs

2011-10-22 Thread Chris Perkins
On Saturday, October 22, 2011 4:31:29 PM UTC-4, Luc wrote: Where's the contract breach here ? Glad you asked. Consider the following clojure session (1.3), shortened for your reading pleasure: map-1 = {-1 :yo} map-2 = {-1 :yo} key-1 = -1 key-2 = -1 Just some simple maps and values,

Re: Clojure 1.3 treatment of integers and longs

2011-10-21 Thread Chris Perkins
Perhaps I can clarify why the 1.3 behavior is confusing. For those who have focused on issues like primitives need to be boxed, therefore you get a long - I think you are missing Nathan's point. Here is what changed about boxing in 1.3: Clojure 1.2: (class (Long/parseLong 1)) =

Re: Rich Hickey: Simple Made Easy from Strange Loop 2011

2011-10-21 Thread Chris Perkins
Wow. Easily the best conference talk I have seen... well, ever. Executive summary: Mutability is bad for your complection. :) - Chris -- 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

Re: About metadat and #^ macro.

2011-10-20 Thread Chris Perkins
Alan, I'm with you on this one. Reflection is so much slower that sometimes I wish clojure had a different syntax for reflective method invocation. For example: 1) Make reflection an automatic error (not even a warning), and 2) Use another syntax (let's say double-dot, for the sake of

Re: Type hints and records

2011-10-20 Thread Chris Perkins
Tangentially: In this particular case, reflection isn't strictly necessary because toString is a method of Object. In theory, the compiler could special-case Object's methods and never do reflection, right? In practice, I don't know if it's worth the effort, although it's certainly a little

Re: Clojure 1.3 wonky behavior

2011-10-20 Thread Chris Perkins
To put it another way: a top-level do is special-cased to compile and then immediately execute each contained form, in order. Any other top-level form, such as list, will be fully compiled, including all contained forms, and only then executed. In this case, the defn cannot compile because the

Re: Clojure 1.3 wonky behavior

2011-10-20 Thread Chris Perkins
Note: I forgot to preface that with I think... :) Upon experimenting briefly, it turns out I was wrong about how Clojure works (that seems to happen a lot with me). A declare/def defines a var even when it's not executed! user (defn xxx [] (declare yyy)) #'user/xxx user yyy #Unbound Unbound:

Re: Should intern work within a try block?

2011-10-12 Thread Chris Perkins
Nothing to do with try - clojure is trying to compile the whole top-level form. Same thing happens with any top-level form (other than do, which is special). user (do (intern *ns* 'foo 23) foo) 23 user (when true (intern *ns* 'bar 44) bar) ; Evaluation aborted. -- You received this message

Re: Equality comparison in 1.3

2011-10-03 Thread Chris Perkins
core.clj currently contains two definitions of =, one of which is commented out. The active one has this docstring: Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compares numbers and collections in a type-independent manner.

Re: Equality comparison in 1.3

2011-10-02 Thread Chris Perkins
Follow-up question: Can someone explain the rationale behind the change to = semantics between integers and floating-point numbers? I have read the design page ( http://dev.clojure.org/display/doc/Documentation+for+1.3+Numerics), but all it seems to have is this somewhat cryptic description:

Re: Equality comparison in 1.3

2011-10-02 Thread Chris Perkins
Luc, I think you are mistaken. user= (clojure-version) 1.2.1 user= (def m {3.0 :a 3 :b}) #'user/m user= (get m 3.0) :a user= (get m 3) :b user= (= 3 3.0) true user= Do you have another example? - Chris -- You received this message because you are subscribed to the Google Groups Clojure

Re: Equality comparison in 1.3

2011-10-02 Thread Chris Perkins
Ok, I follow you now. That makes sense. Sort-of :) On the other hand, it's only inconsistent if you consider clojure's = to map to java's .equals method, but it does not: user= (clojure-version) 1.2.1 user= (= 3 3.0) true user= (.equals 3 3.0) false So it doesn't really violate the contract

Equality comparison in 1.3

2011-10-01 Thread Chris Perkins
I am trying to upgrade some code to 1.3, and I'm not sure how to do the equivalent of a 1.2-style equality comparison. user (= {:foo 23} {:foo 23.0}) false This used to be true. I see that = is now documented to compare same-type numbers only, but == can be used for 1.2-compatible

Re: Mocking out namespaces

2011-09-16 Thread Chris Perkins
On Friday, September 16, 2011 3:12:49 PM UTC-4, Brian Hurt wrote: On Thu, Sep 15, 2011 at 6:42 AM, Chris Perkins chrispe...@gmail.comwrote: On Wednesday, September 14, 2011 11:19:13 AM UTC-4, Brian Hurt wrote: Say I have two name spaces, A and B, with A depending on B. I want to test

Re: Mocking out namespaces

2011-09-15 Thread Chris Perkins
On Wednesday, September 14, 2011 11:19:13 AM UTC-4, Brian Hurt wrote: Say I have two name spaces, A and B, with A depending on B. I want to test namespace A, replacing module B with a mock B for testing purposes- preferably without having to load B at all (B sucks in a bunch of stuff,

Re: Reading clojure code of larger domain specific projects

2011-05-09 Thread Chris Perkins
, and have a weekly reading assignment emailed. Then you could meet on IRC or something. Just a thought. Having said that, I don't have any specific suggestions for you, but I'm also interested in seeing what answers you get. - Chris Perkins -- You received this message because you are subscribed

Re: Creating instances of types not known at compile time

2011-05-09 Thread Chris Perkins
need to pass a symbol, rather than the Class object itself? eg: (defrecord Foo [a b]) (defn new* [klass args] (clojure.lang.Reflector/invokeConstructor klass (to-array args))) (new* Foo 23 hello) #:user.Foo{:a 23, :b hello} - Chris Perkins -- You received this message because you

Re: Creating instances of types not known at compile time

2011-05-09 Thread Chris Perkins
On May 9, 1:49 pm, Alan a...@malloys.org wrote: On May 9, 9:50 am, Chris Perkins chrisperkin...@gmail.com wrote: A mild gripe: we're in a language that doesn't make us use ugly names like klass and clazz. Some will disagree with me for sure, but I think it's more readable to simply use

Re: Closures in macros

2011-05-03 Thread Chris Perkins
cases, having eval pass unexpected types through unchanged can be useful, but I think it would be much more common for it to result in hard-to-debug errors, especially for beginning macro writers. - Chris Perkins -- You received this message because you are subscribed to the Google Groups

Re: Can this function be simpler?

2011-03-10 Thread Chris Perkins
On Mar 10, 12:46 pm, Damien Lepage damienlep...@gmail.com wrote: Hi I wrote a function to transform a variable number of arguments into embedded maps. Here is what it does: (enmap 1 2) {1 2} (enmap 1 2 3) {1 {2 3}} (enmap 1 2 3 4) {1 {2 {3 4}}} (enmap 1 2 3 4 {5 6 7 8}) {1 {2 {3

Re: Rebinding Defs

2011-03-09 Thread Chris Perkins
On Mar 8, 6:59 pm, Timothy Baldridge tbaldri...@gmail.com wrote: If in a namespace I bind a var: (def foo 3) And then later on in my program re-bind that var: (def foo 1) Will all parts of my program instantly see that update? How is it possible to have any sort performance when we're

Re: Rebinding Defs

2011-03-09 Thread Chris Perkins
On Mar 9, 7:31 am, Chris Perkins chrisperkin...@gmail.com wrote: On Mar 8, 6:59 pm, Timothy Baldridge tbaldri...@gmail.com wrote: If in a namespace I bind a var: (def foo 3) And then later on in my program re-bind that var: (def foo 1) Will all parts of my program instantly see

Re: arithmetic progression

2011-03-08 Thread Chris Perkins
On Mar 8, 10:26 am, Fred Concklin fredconck...@gmail.com wrote: Tests whether list is arithmetic progression. Thoughts, feedback: (defn arithmetic-progression? [intlist]   tests if list is arithmetic progression.   (apply =    (map     #(apply - %)     (partition 2 1 (reverse

Unpredictable behavior of Protocol Extension

2011-02-28 Thread Chris Perkins
I am wondering whether this is a known issue. I made the mistake of extending a protocol to two interfaces, and then calling it with an object that implements both. (defprotocol Foo (foo [x])) (extend-protocol Foo clojure.lang.Sequential (foo [x] sequential) clojure.lang.Associative

Re: Unpredictable behavior of Protocol Extension

2011-02-28 Thread Chris Perkins
On Feb 28, 10:49 am, Rich Hickey richhic...@gmail.com wrote: On Feb 28, 2011, at 8:32 AM, Chas Emerick wrote: I agree with your sentiment.  This has been discussed before here: http://groups.google.com/group/clojure-dev/browse_frm/thread/fb3a0b03... That discussion pretty quickly wandered

Re: Problems with lazy-xml

2011-02-11 Thread Chris Perkins
On Feb 11, 5:07 am, Marko Topolnik marko.topol...@gmail.com wrote: http://db.tt/iqTo1Q4 This is a sample XML file with 1000 records -- enough to notice a significant delay when evaluating the code from the original post. Chouser, could you spare a second here? I've been looking and looking

Re: struct type info

2010-11-27 Thread Chris Perkins
On Nov 27, 6:24 am, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: Hello,  I would like to know if it is possible to find out the name of the structure from its instance. my attempt to use the function class is not giving me any useful info. It kept saying that it is  a structmap and

Re: using symbol macros from clojure.contrib.macro-utils does not seem to bind the env environment variable correctly in the nested macro calls

2010-11-26 Thread Chris Perkins
On Nov 26, 12:25 am, Sunil S Nandihalli sunil.nandiha...@gmail.com wrote: I just realized that we don't need to use the with-symbol-macros when using symbol-macrolet .. but the problem persists all the same..  I have modified the gist to reflect this change.. Sunil. On Fri, Nov 26, 2010 at

Re: ANN: Gloss, a byte-format DSL

2010-11-23 Thread Chris Perkins
On Nov 23, 12:03 pm, Zach Tellman ztell...@gmail.com wrote: When writing Calx [1], I discovered it was a huge pain to deal with mixed C datatypes in Java.  When writing Aleph [2], I discovered the problem increases by a factor of ten when dealing with streams of bytes.  In an attempt to

Re: ANN: Gloss, a byte-format DSL

2010-11-23 Thread Chris Perkins
On Nov 23, 3:24 pm, Zach Tellman ztell...@gmail.com wrote: On Nov 23, 12:12 pm, Chris Perkins chrisperkin...@gmail.com wrote: I have only taken a quick look, so maybe I'm misunderstanding the intent, but it's not clear to me how you would use this for sending and receiving structured data

Re: Error message specifies wrong line # in source file if function lacks argvec.

2010-11-19 Thread Chris Perkins
On Nov 18, 11:09 pm, Ken Wesson kwess...@gmail.com wrote: I got this oddity while debugging a Clojure sourcefile today: user= right click load file in netbeans #CompilerException java.lang.IllegalArgumentException: Parameter declaration loop should be a vector (io.clj:55) user= You're

Re: How to rewrite code to avoid bashing transients in-place?

2010-11-09 Thread Chris Perkins
On Nov 8, 4:45 pm, Greg g...@kinostudios.com wrote: I must say it would be really nice if this was considered kosher.. as it does work just fine. It would also be useful to know why transient bashing is frowned upon. It's not that it's frowned upon - it simply doesn't work. Functions that

Re: clojure.xml questions

2010-10-30 Thread Chris Perkins
On Oct 30, 2:52 am, Shantanu Kumar kumar.shant...@gmail.com wrote: Hi, 1. I notice there is just the parse function mentioned as public:http://clojure.github.com/clojure/clojure.xml-api.html I used the other functions in clojure.xml (emit, emit-element) and the var 'element' -- they appear

Re: Python like hash-map constructor (a.k.a. dict)

2010-10-14 Thread Chris Perkins
On Oct 14, 11:54 am, Henk henkp...@gmail.com wrote: (I did some small benchmarks on this), while the list comprehension itself is much faster than python... Not an answer to your question, but: depending on what you mean by much faster, there is a good chance that you measured the clojure for

Re: Macro Implementation: I Don't Understand This Error Message

2010-10-01 Thread Chris Perkins
On Oct 1, 3:59 am, Stefan Rohlfing stefan.rohlf...@gmail.com wrote: I wanted to expand the 'infix' macro presented in chapter 7.3.1 of 'Clojure in Action' to handle nested s-expressions: My first version did not work: (defmacro my-infix [expr]   (if (coll? expr)     (let [ [left op right]

Re: Life on the bleeding edge

2010-06-28 Thread Chris Perkins
On Jun 28, 12:21 am, Mark Engelberg mark.engelb...@gmail.com wrote: OK, I just tried building clojure-contrib pointing at a clojure.jar built from the current master branch.  I get the same errors (on Windows).  Here are more details: Testing clojure.contrib.test-io FAIL in (test-as-url)

Re: Leiningen documentation review?

2010-06-18 Thread Chris Perkins
On Jun 17, 12:24 am, Phil Hagelberg p...@hagelb.org wrote: Mostly I'd like feedback on the tutorial:http://github.com/technomancy/leiningen/blob/master/TUTORIAL.md But if you've got some time to look over the readme, that would be great

Re: Leiningen documentation review?

2010-06-18 Thread Chris Perkins
On Jun 18, 1:21 pm, Phil Hagelberg p...@hagelb.org wrote: On Fri, Jun 18, 2010 at 8:20 AM, Chris Perkins chrisperkin...@gmail.com wrote: This sentence in the README: On Windows you can download lein.bat contains a link to an old and busted version of lein.bat that can only lead to tears

Re: beginer jedit problem

2010-04-29 Thread Chris Perkins
clojure.main. I've never used jline, so I'm afraid I can't help much, but I would recommend using ClojureBox for your repl. Even if you don't want to edit your files in Emacs, it's worth getting ClojureBox just for that. - Chris Perkins -- You received this message because you are subscribed

Re: beginer jedit problem

2010-04-28 Thread Chris Perkins
On Apr 28, 4:56 am, Marko Srepfler marko.srepf...@gmail.com wrote: C:\clojure-1.1.0java -cp jline-0.9.91.jar:clojure.jar You need to separate your classpath entries with a semicolon, not a colon. - Chris Perkins -- You received this message because you are subscribed to the Google Groups

Re: Any window user familiar with clojure-contrib development ?

2010-04-27 Thread Chris Perkins
the lawyers, I hope :) Oh, the joys of working for a big company. - Chris Perkins -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Re: sorted-set-by drops elements

2010-04-16 Thread Chris Perkins
[1] - Chris Perkins -- 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

Re: CSV Lib

2010-04-14 Thread Chris Perkins
of it is. A concrete example explaining the why would help a lot. - Chris Perkins -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Chris Perkins
On Mar 4, 8:33 am, Jan Rychter j...@rychter.com wrote: I haven't hacked on new Clojure stuff for the past two months or so. Now, having updated my repositories, I find that everybody just dropped ant and moved to leiningen. How do people deal with this? I don't have any good answers for you;

Re: What is EvalReader?

2010-02-19 Thread Chris Perkins
On Feb 19, 4:32 am, timc timgcl...@gmail.com wrote: Is #= an undocumented reader macro character? Interesting - I had never heard of it either. It appears to allow you to execute code at read-time. user= (read-string (foo (+ 2 3) bar)) (foo (+ 2 3) bar) user= (read-string (foo #=(+ 2 3) bar))

Re: clojure-contrib on Windows

2010-02-17 Thread Chris Perkins
On Feb 16, 5:51 pm, Ram rve...@gmail.com wrote: I'm having an issue compiling clojure-contrib on Windows. I downloaded the code from the git repository and when I run Maven, after compilation it runs through the test suite fails in test-io: FAIL in (test-as-url)