Re: Baltimore Functional Programming

2011-11-30 Thread rzeze...@gmail.com
I'm also interested. I just started to go to beehive occasionally and I was recently discussing with someone how it would be nice to have a FP group. I live in Federal Hill. On Nov 30, 11:09 am, Gary Trakhman gary.trakh...@gmail.com wrote: Awesome, so it looks like there will be enough people

Re: Erlang/OTP in clojure

2011-08-12 Thread rzeze...@gmail.com
Ole, Glad you liked my posts on Riak. I took a quick glance at your code and it's amazing how much Clojure I've forgotten over the last year. I need to read my Joy of Clojure :) If you're looking for Erlang/OTP in Clojure land than I think an easier path might be to look at Erjang [1]. AFAICT,

Re: Clojure script in the classpath

2010-06-19 Thread rzeze...@gmail.com
On Jun 18, 6:15 pm, Paul Moore p.f.mo...@gmail.com wrote: I've just seen a couple of postings which, if I'm not mistaken, imply that it's possible to have a Clojure script in my classspath. Is that right? Yes, you can have .clj files on your classpath. In fact, you can pretty much have

Re: classpath and require

2010-06-19 Thread rzeze...@gmail.com
On Jun 18, 5:00 pm, Mohammad Khan beepl...@gmail.com wrote: C:\Projects.cljjava -cp c:\clojure-contrib\clojure-contrib.jar;c:\clojure\clojure.jar clojure.main Clojure 1.1.0-alpha-SNAPSHOT user= (require 'examples.introduction) java.io.FileNotFoundException: Could not locate

Re: Basic toolset for non-Java programmer

2010-06-18 Thread rzeze...@gmail.com
While not reflective of the entire community, here's my suggestions. - Build tools: There seem to be things like ant, maven, leiningen. How do they relate to each other? Is there an obvious best answer or should I be expecting to check them all out depending on my needs? In that case, are

Re: Passing Arguments From Java to Clojure

2010-06-16 Thread rzeze...@gmail.com
-- CallClojure.java -- import clojure.lang.RT; import clojure.lang.Var; import clojure.lang.PersistentVector; public class CallClojure { static PersistentVector toVec(int[][] arr) { PersistentVector pv = PersistentVector.EMPTY; for (int[] a : arr) {

bit-and reflection warning

2010-06-02 Thread rzeze...@gmail.com
When using bit-and with longs I get a reflection warning. How can I make this go away? user (bit-and (long -10) 0x) Reflection warning, NO_SOURCE_FILE:1 - call to and can't be resolved. 4294967286 -- You received this message because you are subscribed to the Google Groups Clojure

Re: apply with constructors

2010-06-02 Thread rzeze...@gmail.com
Can you let the fn call figure that out for you? Like so:     (apply (fn ([p1 p2] (new Connection.Configuration p1 p2))                ([p1 p2 p3] (new Connection.Configuration p1 p2 p3)))            params) I realize that reflection is probably better in this case, but was wondering if

Re: bit-and reflection warning

2010-06-02 Thread rzeze...@gmail.com
I was able to make this go away by adding a method to Numbers.java. I have a use case where I'm calling bit-and with two longs tens of millions of times. Is there another way I could avoid this reflection without this change to the Java source? diff --git a/src/jvm/clojure/lang/Numbers.java

Re: Some basic guidance to designing functional vs. state parts of app

2010-03-03 Thread rzeze...@gmail.com
On Mar 2, 11:34 pm, Sophie itsme...@hotmail.com wrote: How do I choose? What are the trade-offs? Any and all guidance, insights, advice etc. welcome! Thanks! To me, it seems like you have two orthogonal pieces of data, and a function that builds a report from that data. You have a set of

Re: more lazy fun

2010-02-01 Thread rzeze...@gmail.com
On Jan 28, 3:26 pm, Raoul Duke rao...@gmail.com wrote: [gmail is freaking out, apologies if this is sent twice] On Thu, Jan 28, 2010 at 12:23 PM, DanL leidis...@gmail.com wrote: When exactly would a lazy sequence evaluate to false? i thought it was happening with code like: (let

Re: strange typecheck error

2009-12-30 Thread rzeze...@gmail.com
On Dec 30, 12:53 pm, Alex Ott alex...@gmail.com wrote: If need, i can submit somebody full test case I think this might help because it's hard to tell what you are trying to do without a little more context. Some odd things that stand out to me: 1) You call loop, but you should be calling

Re: Web application framework (beta)

2009-12-01 Thread rzeze...@gmail.com
I'm not privy to all the technical details, but perhaps work done on Swarm could be insightful? http://code.google.com/p/swarm-dpl/ -- 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: Space leak with lazy sequences.

2009-12-01 Thread rzeze...@gmail.com
I'm having similar problems, but am hesitant to post until I do some further analysis. However, I thought I'd share some techniques I'm trying to use to hunt down my memory leak. First, you can make GC verbose. -verbose:gc For even more detail, add the following. -XX:+PrintGCTimeStamps

Re: Clojure is two!

2009-10-16 Thread rzeze...@gmail.com
On Oct 16, 12:12 pm, Rich Hickey richhic...@gmail.com wrote: http://clojure.blogspot.com/2009/10/clojure-is-two.html Thanks again to all! Rich Stu Halloway's terrific book, and more books on the way Can anyone elaborate on this? --~--~-~--~~~---~--~~ You

Re: immutable defs?

2009-10-06 Thread rzeze...@gmail.com
On Oct 2, 11:52 am, Mark Tomko mjt0...@gmail.com wrote: However, outside the scope of a function, it seems that it's possible for bindings to be redefined later in a file without causing an immediate error.  This could easily lead to mistakes that would manifest as silent and potentially

Re: Enlive questions

2009-05-07 Thread rzeze...@gmail.com
On May 6, 1:36 am, Christophe Grand christo...@cgrand.net wrote: Hello Ryan, rzeze...@gmail.com a écrit : Either I've missed something, orEnlive*appears* to have problems handling comment tags. Indeed. I pushed a fix, please tell me whether it works for you now. Thanks for the report

Re: Enlive questions

2009-05-05 Thread rzeze...@gmail.com
Either I've missed something, or Enlive *appears* to have problems handling comment tags. I was using Enlive against an already existing HTML file and kept getting the following exception (please note it is HTML 4.01 Strict and passed validation): java.lang.RuntimeException:

Re: The Path to 1.0

2009-04-17 Thread rzeze...@gmail.com
As with any decision, it will be impossible to please everyone. I think the Git vs Subversion talk is way off topic at this point, but to each his own. Rich, I think it really depends on what *YOU* want Clojure to be. If you want to take a Haskell like approach and avoid success at all costs

Re: Contribs with dependencies

2009-04-15 Thread rzeze...@gmail.com
My .02 cents... I always viewed Contrib as an incubator of sorts for Core. That it was simply a testing ground for functionality that *MIGHT* make it into Core if enough people find it useful, or Rich hands down his good graces. Requiring a few external libs here and there, and breaking

Re: Contribs with dependencies

2009-04-15 Thread rzeze...@gmail.com
My .02 cents... I always viewed Contrib as an incubator of sorts for Core. That it was simply a testing ground for functionality that *MIGHT* make it into Core if enough people find it useful, or Rich hands down his good graces. Requiring a few external libs here and there, and breaking

Re: speed question

2009-04-03 Thread rzeze...@gmail.com
Could Clojure have something similar to CL's 'defconstant'? http://gigamonkeys.com/book/variables.html On Apr 2, 4:09 pm, Bradbev brad.beveri...@gmail.com wrote: It seems to me that the real solution is that the Clojure compiler needs to support global constants.  You could probably emulate

Re: Keeping a ref and a DB in sync

2009-04-03 Thread rzeze...@gmail.com
Brian, I imagine you are asking this in relation to your blog engine? I came up with solution, that is, if you don't mind writing the persistent data fresh every time. http://paste.lisp.org/display/77987 Basically, I added a watch to the *comment* ref, which set the *db* ref to the new state

Re: VimClojure 2.0.0 released (merged with Gorilla)

2009-03-12 Thread rzeze...@gmail.com
Meikel, found a few more things that might need fixing. 1) In the preview window it says Use \p to close this buffer!, but I have m LocalLeader mapped to ,. I'm guessing maybe you hardcoded this by accident? 2) When doing a macroexpand (me or m1), the cursor is moved into the REPL buffer. Is

Re: version of - short-circuiting on nil

2009-03-11 Thread rzeze...@gmail.com
Not that I have any immediate use for this at the moment, but I +1 your proposal. I make use of the ?. operating in Groovy, and it can be helpful. On Mar 10, 4:08 am, Laurent PETIT laurent.pe...@gmail.com wrote: Hello, 2009/3/10 Jason Wolfe jawo...@berkeley.edu (let [person

Re: Shouldn't doto be named just with

2009-03-06 Thread rzeze...@gmail.com
I think good arguments have been made for doto, but I must say I prefer with slightly more. FWIW, Groovy calls it with. http://javajeff.blogspot.com/2008/11/getting-groovy-with-with.html The great thing about Clojure is that if this really bothered me I could easily take matters into my own

Re: Unicode, accented characters

2009-03-06 Thread rzeze...@gmail.com
On Mar 6, 5:58 pm, max3000 maxime.lar...@gmail.com wrote: I don't really want to use the SVN version because I'm developing an application and can really do without the (normal) instabilities that come with development builds. FYI, you may want to consider using SVN for now because there

Re: A Clojure documentation browser

2009-02-16 Thread rzeze...@gmail.com
On Feb 12, 3:31 pm, Craig Andera craig.and...@gmail.com wrote: Nice work! Thanks. Two things related to 'strcat'. 1) This is already implemented as clojure.core/str (and is more efficient than concat'ing) 2) This function is never called :) Yeah, that code was cut and pasted from

Re: what's the typical usage of fn constantly

2009-01-25 Thread rzeze...@gmail.com
Following James's description, I would image constantly's implementation to look something like the following. (defn constantly [value] #(identity value)) If you haven't seen the # macro before, the form below is equivalent. (defn constantly [value] (fn [] (identity value))) Making use of

merge, not just for maps?

2009-01-23 Thread rzeze...@gmail.com
user= (doc merge) - clojure.core/merge ([ maps]) Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result. nil According to

Re: when performance matters

2009-01-14 Thread rzeze...@gmail.com
On Jan 13, 8:04 am, Mark P pierh...@gmail.com wrote: A macro cannot depend on runtime information. A macro is a function   that is called at compile time, its argument is an expression (as   written by the programmer, or as returned by another macro), and its   result is a modified

Re: finding all vars starting with *

2009-01-09 Thread rzeze...@gmail.com
On Jan 8, 5:04 pm, Chouser chou...@gmail.com wrote: On Tue, Jan 6, 2009 at 2:53 PM, rzeze...@gmail.com rzeze...@gmail.com wrote: On Jan 4, 6:05 pm, Brian Doyle brianpdo...@gmail.com wrote: Is there some place where all of these vars are defined?   Is there some way programatically I

Re: metadata question

2009-01-07 Thread rzeze...@gmail.com
On Jan 7, 10:37 am, Rich Hickey richhic...@gmail.com wrote: On Jan 7, 1:01 am, rzeze...@gmail.com rzeze...@gmail.com wrote: Looking at how the #^ macro is used in core.clj confuses me even more. For example: user= (def #^{:arglist '([name]) :doc Say hello.} hello (fn hello [name

Re: (alength nil) = java.lang.IllegalArgumentException: More than one matching method found

2009-01-06 Thread rzeze...@gmail.com
On Jan 6, 9:54 am, Chouser chou...@gmail.com wrote: On Mon, Jan 5, 2009 at 11:29 PM, rzeze...@gmail.com rzeze...@gmail.com wrote: I was just messing around with array's and produced the following exception.  I don't actually need this to work for any reason, but I was rather surprised

Re: finding all vars starting with *

2009-01-06 Thread rzeze...@gmail.com
On Jan 4, 6:05 pm, Brian Doyle brianpdo...@gmail.com wrote: Today I found out about the var *file*.  I looked it up *file* on clojure.com/api and couldn't find anything. Is there some place where all of these vars are defined?   Is there some way programatically I can find them all?  

Re: metadata question

2009-01-06 Thread rzeze...@gmail.com
On Jan 6, 11:35 pm, wubbie sunj...@gmail.com wrote: Hi, Here is the question on differences between with-meta and #^ Specifically 1) and 2) are different in that 1) has meta info carried over to jumping-wubbie, while 2) has not. What's the rationale behind this? user= (def wubbie {:name

(alength nil) = java.lang.IllegalArgumentException: More than one matching method found

2009-01-05 Thread rzeze...@gmail.com
I was just messing around with array's and produced the following exception. I don't actually need this to work for any reason, but I was rather surprised by the behavior. Is this a bug or expected behavior? Please note I'm using revision 1195. user= (alength nil)

Re: Using java.ext.dirs to manage the Classpath for Clojure REPLs

2009-01-04 Thread rzeze...@gmail.com
I think this should be fine for 99% of situations, but I think it's also fair to say this is an unorthodox use of java.ext.dirs. I've never really had a firm grip on the idiomatic use of Java's extension mechanism, but I do know that they claim it is for well-established extension/optional

code golf

2008-12-17 Thread rzeze...@gmail.com
Neat challenge on stackoverflow: http://stackoverflow.com/questions/372668/code-golf-how-do-i-write-the-shortest-character-mapping-program I added an implementation in Clojure. One that I'm sure could be greatly improved on. I don't really care for the extremely obfuscated examples. Sure,

Re: code golf

2008-12-17 Thread rzeze...@gmail.com
On Dec 17, 8:09 pm, Chouser chou...@gmail.com wrote: I don't think I agree with the premise of the question, that golf answers help anyone learn about other languages. But I can't deny that golfing is fun! (defn enc[s e](apply str(map(into{}(for[[o _ n](partition 3 4 e)][o n]))s))) I

Re: In core structure editor, anyone?

2008-12-10 Thread rzeze...@gmail.com
On Dec 10, 3:59 pm, falcon [EMAIL PROTECTED] wrote: Could you describe in-core editing a bit more?  Sounds interesting. +1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

Re: Running out of memory when using filter?

2008-12-07 Thread rzeze...@gmail.com
On Dec 7, 1:52 am, Chouser [EMAIL PROTECTED] wrote: On Sun, Dec 7, 2008 at 1:16 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm also running into, what I believe to be, the same problem.  Every time I run the following code I get java.lang.OutOfMemoryError: Java heap space. (use