Re: How about write clojure code like python mode?

2009-08-28 Thread Daniel Lyons
On Aug 27, 2009, at 9:45 AM, Richard Newman wrote: One reason for it not catching on is probably that anyone who's learned enough Lisp to implement it has become comfortable enough with parens to not use it. The same applies for the newbie who decides to learn enough to start

Re: clojure vs scala

2009-08-28 Thread e
On Thu, Aug 27, 2009 at 9:57 AM, Emeka emekami...@gmail.com wrote: e, What is inspiring in it? H from time to time, people use percent literacy as a measure of public intellectual health, right? In that case, it's sort of obvious that literacy is a goal. Well, I'm wondering if we

I18n

2009-08-28 Thread ngocdaothanh
Hi all, Is there an i18n library for Clojure? What Java i18n library should I use in a Clojure program (it suits Clojure syntax for example)? For Ruby and Erlang I prefer Gettext, but for Java it seems that .properties files are in major use. Thanks, Ngoc.

Re: clojure vs scala

2009-08-28 Thread Timothy Pratley
http://www.pragprog.com/magazines/download/1.pdf Page 16 RH talks about Erlang and Scala vs Clojure in an interview I found it to be a very useful comparison --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure

Re: clojure vs scala

2009-08-28 Thread Emeka
e, I just picked a new word 'Rogramming'? Regards, Emeka On Fri, Aug 28, 2009 at 1:30 AM, e evier...@gmail.com wrote: On Thu, Aug 27, 2009 at 9:57 AM, Emeka emekami...@gmail.com wrote: e, What is inspiring in it? H from time to time, people use percent literacy as a measure

with-open should use a close multimethod?

2009-08-28 Thread Mike Hinchey
I have a suggestion for the with-open macro. It calls .close when it's finished. I'd like it to have a (defmulti close type) so it's behavior is extensible. A standard method could be defined for java.io.Closeable and a :default method with no type hint. I've come across a few cases where some

Re: Java STM

2009-08-28 Thread peter veentjer
No. I don't want to use transactions for workflow. I don't want blocking transactions. I don't want read tracking. With multiverse it depends on the engine being used and the settings on the transaction. And readonly transactions also don't track reads. And since Clojure is using MVCC, does

Re: Java STM

2009-08-28 Thread Emeka
Peter, you will get there some day. On Fri, Aug 28, 2009 at 8:45 AM, peter veentjer alarmnum...@gmail.comwrote: No. I don't want to use transactions for workflow. I don't want blocking transactions. I don't want read tracking. With multiverse it depends on the engine being used and the

Re: with-open should use a close multimethod?

2009-08-28 Thread Seth
Sounds good to me. On Aug 28, 4:27 am, Mike Hinchey hinche...@gmail.com wrote: I have a suggestion for the with-open macro.  It calls .close when it's finished.  I'd like it to have a (defmulti close type) so it's behavior is extensible.  A standard method could be defined for

Clojure/EPL and the GPL

2009-08-28 Thread Tassilo Horn
Hi all, I have a licensing question. Am I allowed to include clojure.jar in a GPL project? On the net I've found out that the EPL is not GPL compliant, and there's an explicit statement by the FSF that it's not possible to include GPL code inside an EPL licensed project, or to create an EPL

Re: Lazy Exceptions

2009-08-28 Thread Meikel Brandmeyer
Hi, On Aug 28, 6:07 am, eyeris drewpvo...@gmail.com wrote: When you say the original do you mean the outer-most RuntimeException or the inner-most exception? It think I meant the outer-most exception. Sincerely Meikel --~--~-~--~~~---~--~~ You received this

Re: vimclojure issues

2009-08-28 Thread viksit
Actually, I've got the same problem. (defn greet [] (println Hello, World!)) With \et. example2.clj 1,7All Error detected while processing function vimclojure#EvalToplevel: line8: E605: Exception not caught: Error: Not in toplevel expression! Press ENTER or type command to

Re: with-open should use a close multimethod?

2009-08-28 Thread Sean Devlin
+1 On Aug 28, 9:41 am, Chas Emerick cemer...@snowtide.com wrote: Definitely +1, yes. - Chas On Aug 28, 2009, at 4:27 AM, Mike Hinchey wrote: I have a suggestion for the with-open macro.  It calls .close when   it's finished.  I'd like it to have a (defmulti close type) so it's  

Re: with-open should use a close multimethod?

2009-08-28 Thread J. McConnell
+1 On Fri, Aug 28, 2009 at 4:27 AM, Mike Hinchey hinche...@gmail.com wrote: I have a suggestion for the with-open macro. It calls .close when it's finished. I'd like it to have a (defmulti close type) so it's behavior is extensible. A standard method could be defined for java.io.Closeable

clj-apache-http not being found in classpath?

2009-08-28 Thread dmix
I am trying to play around with the clojure-twitter library (http:// github.com/mattrepl/clojure-twitter/tree) and it depends on clj-apache- http (http://github.com/rnewman/clj-apache-http/tree/master). So I cloned the repo, built it with ant and added the clj-apache- http.jar to my classpath.

Re: with-open should use a close multimethod?

2009-08-28 Thread C. Florian Ebeling
+1 Coming across that problem just yesterday. On Fri, Aug 28, 2009 at 3:54 PM, Sean Devlinfrancoisdev...@gmail.com wrote: +1 On Aug 28, 9:41 am, Chas Emerick cemer...@snowtide.com wrote: Definitely +1, yes. - Chas On Aug 28, 2009, at 4:27 AM, Mike Hinchey wrote: I have a suggestion

Re: Java STM

2009-08-28 Thread Rich Hickey
On Fri, Aug 28, 2009 at 4:45 AM, peter veentjeralarmnum...@gmail.com wrote: No. I don't want to use transactions for workflow. I don't want blocking transactions. I don't want read tracking. With multiverse it depends on the engine being used and the settings on the transaction. And

Re: Java STM

2009-08-28 Thread John Harrop
On Fri, Aug 28, 2009 at 4:45 AM, peter veentjer alarmnum...@gmail.comwrote: Clojure's STM is part of a holistic language design where people will normally be programming with immutable persistent composite data structures. Getting a consistent view of such a data structure doesn't require

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Shawn Hoover
On Thu, Aug 27, 2009 at 9:05 PM, Chas Emerick cemer...@snowtide.com wrote: On Aug 27, 2009, at 1:34 PM, Chouser wrote: The benefits of # producing a real java.util.regex.Pattern object instead of some Clojury wrapper will decrease as it becomes more common to write Clojure code that can

Re: I18n

2009-08-28 Thread cody koeninger
On Aug 28, 12:16 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi all, Is there an i18n library for Clojure? What Java i18n library should I use in a Clojure program (it suits Clojure syntax for example)? For Ruby and Erlang I prefer Gettext, but for Java it seems that .properties files

Re: Clojure/EPL and the GPL

2009-08-28 Thread Matthias Benkard
On 28 Aug., 13:42, Tassilo Horn tass...@member.fsf.org wrote: I have a licensing question.  Am I allowed to include clojure.jar in a GPL project? IANAL, but if I understand the GPL correctly, it prohibits you from distributing a GPL-covered programme that is based on Clojure, because it would

Re: I18n

2009-08-28 Thread Stuart Sierra
My recommendation would be to keep your localized strings separate from your source code, either in properties files or using a text template system such as stringtemplate.org -SS On Aug 28, 1:16 am, ngocdaothanh ngocdaoth...@gmail.com wrote: Hi all, Is there an i18n library for Clojure?

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Chouser
On Thu, Aug 27, 2009 at 9:05 PM, Chas Emerickcemer...@snowtide.com wrote: On Aug 27, 2009, at 1:34 PM, Chouser wrote: The benefits of # producing a real java.util.regex.Pattern object instead of some Clojury wrapper will decrease as it becomes more common to write Clojure code that can run

Re: Lazy Exceptions

2009-08-28 Thread John Harrop
On Fri, Aug 28, 2009 at 8:50 AM, Rich Hickey richhic...@gmail.com wrote: On Thu, Aug 27, 2009 at 8:10 PM, Tim Snydertsnyder...@gmail.com wrote: Well, I can see that LazySeq does indeed catch and wrap all Exceptions in a RuntimeException. I also think I can work around it, but I'd like

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Chas Emerick
On Aug 28, 2009, at 10:01 AM, Shawn Hoover wrote: Why wouldn't # produce whatever the corollary regex object is on each host platform? I had a couple suggestions on clojure-dev for ClojureCLR that line up with the produce the corollary idea:

Re: clj-apache-http not being found in classpath?

2009-08-28 Thread Richard Newman
I am trying to play around with the clojure-twitter library (http:// github.com/mattrepl/clojure-twitter/tree) and it depends on clj- apache- http (http://github.com/rnewman/clj-apache-http/tree/master). This is my lib, so I'll answer :) Now when I run: java -cp CLASSPATH twitter.clj

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Chouser
On Fri, Aug 28, 2009 at 10:01 AM, Shawn Hoovershawn.hoo...@gmail.com wrote: However, unless the platforms agree on literal regex syntax (they don't, beyond the basic asdf|[0-9]+ features) will prevent true portability of the literals. This is an interesting and crucial assertion. If the

Re: Lazy Exceptions

2009-08-28 Thread Rich Hickey
On Fri, Aug 28, 2009 at 10:57 AM, John Harropjharrop...@gmail.com wrote: On Fri, Aug 28, 2009 at 8:50 AM, Rich Hickey richhic...@gmail.com wrote: On Thu, Aug 27, 2009 at 8:10 PM, Tim Snydertsnyder...@gmail.com wrote: Well, I can see that LazySeq does indeed catch and wrap all Exceptions

Re: Lazy Exceptions

2009-08-28 Thread B Smith-Mannschott
On Fri, Aug 28, 2009 at 16:57, John Harropjharrop...@gmail.com wrote: On Fri, Aug 28, 2009 at 8:50 AM, Rich Hickey richhic...@gmail.com wrote: On Thu, Aug 27, 2009 at 8:10 PM, Tim Snydertsnyder...@gmail.com wrote: Well, I can see that LazySeq does indeed catch and wrap all Exceptions in

Re: clj-apache-http not being found in classpath?

2009-08-28 Thread Dan McGrady
Your right, clj-apache-http.jar didn't build properly. It only contained a manifest. When I do ant in the /clj-apache-http/ folder I get this (terminal output): http://gist.github.com/177087 I'll try to figure out how to build it properly later today, I'm coming from Ruby so I'm not familiar

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Chas Emerick
On Aug 28, 2009, at 12:13 PM, Chouser wrote: On Fri, Aug 28, 2009 at 10:01 AM, Shawn Hoovershawn.hoo...@gmail.com wrote: However, unless the platforms agree on literal regex syntax (they don't, beyond the basic asdf|[0-9]+ features) will prevent true portability of the literals. This

Re: Clojure/EPL and the GPL

2009-08-28 Thread Tassilo Horn
Matthias Benkard mulkiat...@gmail.com writes: Hi Matthias, On 28 Aug., 13:42, Tassilo Horn tass...@member.fsf.org wrote: I have a licensing question. Am I allowed to include clojure.jar in a GPL project? IANAL, but if I understand the GPL correctly, it prohibits you from distributing a

Re: with-open should use a close multimethod?

2009-08-28 Thread Jarkko Oranen
I'll submit a patch if it's wanted.  This would fit in core, or maybe contrib.duck-streams with a slightly different name. This should be in core I think, so that it can work with with-open— unless we're going to duplicate with-open in contrib. :/ -- Jarkko

Re: Clojure/EPL and the GPL

2009-08-28 Thread Daniel Renfer
perhaps this link in the FAQ for the EPL will clear things up. http://www.eclipse.org/legal/eplfaq.php#USEINANOTHER On Fri, Aug 28, 2009 at 1:11 PM, Tassilo Horntass...@member.fsf.org wrote: Matthias Benkard mulkiat...@gmail.com writes: Hi Matthias, On 28 Aug., 13:42, Tassilo Horn

Significant isa? / multimethod optimization opportunity

2009-08-28 Thread Chas Emerick
In the course of doing some profiling tonight, I hit on a hotspot in some particularly multimethod- and isa?-heavy code. It didn't take me long to find that the bases and supers support fns for isa? were at the root of the issue, with bases in particular taking more time in aggregate

Re: Order of keys within a map?

2009-08-28 Thread Travis
Is the number 8 just a magic number? Can it be changed with an environment variable or system variable or binding? I would definitely like to. I am particularly annoyed by how the function into changes my array maps into hash maps when they grow. The type of the first argument is an array map,

How to migrate definitions to another namespace ?

2009-08-28 Thread Vagif Verdi
I often refactor my code and move some functions to new modules. Unfortunately i cannot load them, because clojure says that function with such name is already loaded from another namespace. I could not find nothing better but to close my clojure session (which means bring down the web server)

Re: How to migrate definitions to another namespace ?

2009-08-28 Thread J. McConnell
On Aug 28, 2009, at 11:55 PM, Vagif Verdi vagif.ve...@gmail.com wrote: I often refactor my code and move some functions to new modules. Unfortunately i cannot load them, because clojure says that function with such name is already loaded from another namespace. I could not find nothing

Re: How to migrate definitions to another namespace ?

2009-08-28 Thread Timothy Pratley
How about something like this? user= (ns fun) fun= (defn myfun [] 1) fun= (defn myfun2 [] 1) fun= (keys (ns-publics 'fun)) (myfun myfun2) fun= (doseq [s (keys (ns-publics 'fun))] (ns-unmap 'fun s)) fun= (myfun) java.lang.Exception: Unable to resolve symbol: myfun in this context

Re: How to migrate definitions to another namespace ?

2009-08-28 Thread Mike Hinchey
I use (remove-ns 'my-ns), then reload the entire file. -Mike --~--~-~--~~~---~--~~ 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