Re: reload modified java class

2009-03-18 Thread linh
Emacs and slime works fine for me, but I'm willing to try other alternatives. Thanks for the tip. On 17 Mar, 23:02, Laurent PETIT wrote: > If you don't have a preferred environment right now, or if your preferred > environment is already Eclipse, you could try installing clojuredev. > > It provi

Re: filter1 interesting?

2009-03-18 Thread Laurent PETIT
2009/3/18 Vagif Verdi > > The power of functional programming is in small number of orthogonal > functions. I'm afraid all these combination functions will quickly > transform clojure into php. > Besides it introduces several ways to do the same thing - more > confusion (especially to newbies). >

Accessing java objects from SLIME using Swank (was: Starting Swank from Java)

2009-03-18 Thread Tassilo Horn
Tassilo Horn writes: >> Take a look at this blog post: >> http://avodonosov.blogspot.com/2008/12/simpler-clojureslime-embedding.html >> >> I think you will find it useful. > > Cool, but I had to modify it a bit to get it working: > > (add-classpath "file:///home/horn/repos/el/swank-clojure/") >

Re: Accessing java objects from SLIME using Swank

2009-03-18 Thread Christophe Grand
Tassilo Horn a écrit : > Tassilo Horn writes: > > >>> Take a look at this blog post: >>> http://avodonosov.blogspot.com/2008/12/simpler-clojureslime-embedding.html >>> >>> I think you will find it useful. >>> >> Cool, but I had to modify it a bit to get it working: >> >> (add-classpath

Re: filter1 interesting?

2009-03-18 Thread Vagif Verdi
On Mar 17, 11:50 pm, Laurent PETIT wrote: > The comp function in clojure.core does just this. I know about comp function. I was talking about introducing a special syntax for it. Since one of the fundamental techniques of functional programming is composing chains of functions, clojure should h

Re: SLIME: evaluating forms?

2009-03-18 Thread Elena
On Mar 17, 2:16 pm, Elena wrote: > That worked, thanks. Well, not quite. slime-repl-set-package does set the REPL's package, but according to the mini-buffer feedback further slime-eval-defun are still into the user package. I'm puzzled :-/ --~--~-~--~~~---~--~~

Re: How to abort a long running operation at the SLIME REPL?

2009-03-18 Thread gdscott
On Mar 15, 12:24 pm, Raffael Cavallaro wrote: > > > shows how to do this > > basically, add the following to your user.clj > > (use 'clojure.contrib.repl-utils) > > (add-break-thread!) > > then whenever you type ctrl-c ctrl-c ret

Creating Java Objects for Rhino at runtime

2009-03-18 Thread Sverre Johansen
Hi, I'm working on a tool where I am embedding the Rhino JavaScript engine within Clojure and exposing an API to JavaScript. Rhino has support for exposing Java objects directly. I want to define this Java API in Clojure, but as I've understood it there is no way in Clojure to create this at run

Re: Accessing java objects from SLIME using Swank

2009-03-18 Thread Tassilo Horn
Christophe Grand writes: Hi Christophe, >> Ok, so now I can start a swank server from Java and can connect to it >> using SLIME. But now comes the next problem: How do I access the >> objects of the running java app? >> >> Basically all our apps operate on a graph, and that's what I'd like >>

lazy-cons

2009-03-18 Thread Notfonk
Hey i'm not sure this is the right place to post that Could you please remove lazy-cons from the api doc ? I'm a newbie to clojure, and i may be a little dumb, but i spent 1 hour searching for it and wondering what was wrong before i saw in Clojure >> lazy that it was deprecated Thanks for this

Re: Creating Java Objects for Rhino at runtime

2009-03-18 Thread Christian Vest Hansen
You can expose ScriptableObjects that you have called defineProperty[1] on in order to create their interface, no? If I'm not mistaken, creating a method is like defining a property with the value that is a proxy of Function. [1]: http://www.mozilla.org/rhino/apidocs/org/mozilla/javascript/Scr

Re: filter1 interesting?

2009-03-18 Thread e
> The power of functional programming is in small number of orthogonal > functions. I'm afraid all these combination functions will quickly > transform clojure into php. Definitely some truth to this! I had actually gotten turned off by the -> operator, for example ... and started messing with s

Re: filter1 interesting?

2009-03-18 Thread Joshua Fox
core.clj is a good guide to the minimal bootstrap content of Clojure. Joshua On Wed, Mar 18, 2009 at 2:18 PM, e wrote: > > > >> The power of functional programming is in small number of orthogonal >> functions. I'm afraid all these combination functions will quickly >> transform clojure into ph

Re: Accessing java objects from SLIME using Swank (was: Starting Swank from Java)

2009-03-18 Thread Michael Reid
On Wed, Mar 18, 2009 at 4:02 AM, Tassilo Horn wrote: > > Tassilo Horn writes: > >>> Take a look at this blog post: >>> http://avodonosov.blogspot.com/2008/12/simpler-clojureslime-embedding.html >>> >>> I think you will find it useful. >> >> Cool, but I had to modify it a bit to get it working: >

clojure IntelliJ IDEA plugin on google groups

2009-03-18 Thread Laurent PETIT
Hello, Shouldn't the main page of the google group project be updated to reflect the new location of the code at JetBrains's web site ? Regards, -- Laurent --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure"

Re: Accessing java objects from SLIME using Swank

2009-03-18 Thread Tassilo Horn
Michael Reid writes: Hi Michael, >>     ... >>     Graph g = GraphIO.loadGraphFromFile("foo.tg"); >>     defInClojure("graph", g); >>     ... >> >> so that from inside SLIME I have a variable graph holding a reference >> to the graph g from the java app.  If possible, how would I do this? >> >

vimclojure problem (have browsed other threads)

2009-03-18 Thread Notfonk
Hey there, i'm scratching my head because i'm facing a problem with installing vimclojure, and there seems to be nothing i can do to resolve it. Things looks pretty basic, same error than everyone in vim : Erreur détectée en traitant function vimclojure#ExecuteNailWithInput : ligne 23 : E605:

A newbie implementation of partition-by with lazy-seq

2009-03-18 Thread atreyu
Hi, to get compiled clj-contrib with the lastest version of clojure i had to rewrite partition-by and replace lazy-cons with lazy-seq. I think its wrong but it works! umbly i wait yours corrections (defn partition-by "Applies f to each value in coll, splitting it each time f returns a new v

Re: Creating Java Objects for Rhino at runtime

2009-03-18 Thread Stuart Sierra
On Mar 18, 1:56 am, Sverre Johansen wrote: > The alternative is gen-class, but then I need to first compile and add > the classes to my class path, and for me that doesn't match well with > the way I like to develop using Emacs and Slime. I want to implement > one method at the time and "play aro

Re: Unit Testing Macros

2009-03-18 Thread Stuart Sierra
On Mar 17, 6:06 pm, Sean wrote: >    I'm writing a macro library for myself, and I'm thinking about > publishing it.  Before I do so, I'd like to write & run some unit > tests for it.  I was hoping the crowd could chime in on how they test > macros.  Any links & examples would be great.  Thanks!

Re: A newbie implementation of partition-by with lazy-seq

2009-03-18 Thread Stephen C. Gilardi
On Mar 18, 2009, at 12:35 PM, atreyu wrote: Hi, to get compiled clj-contrib with the lastest version of clojure i had to rewrite partition-by and replace lazy-cons with lazy-seq. I think its wrong but it works! The current svn head of clojure-contrib works with the current svn head of cloju

Re: vimclojure problem (have browsed other threads)

2009-03-18 Thread Meikel Brandmeyer
Hi, Am 18.03.2009 um 17:06 schrieb Notfonk: java.lang.NoClassDefFoundError: clojure/lang/IFn The problem is, that you don't have the clojure.jar in your Classpath... CLASSPATH=/home/notfonk/Documents/programmation/clojure/clojure/ clojure.rar:/home/notfonk/Documents/programmation/clojure/cl

Slash mystery

2009-03-18 Thread Konrad Hinsen
Consider the following session: user=> / # user=> clojure.core// # user=> (ns-unmap *ns* '/) nil user=> / java.lang.Exception: Unable to resolve symbol: / in this context (NO_SOURCE_FILE:0) user=> (defn / [a b] (clojure.core// a b)) #'user// user=> / # user=> user// java.lang.Exception: Invalid

Re: Slash mystery

2009-03-18 Thread Kevin Downey
this came up on irc starting: http://clojure-log.n01se.net/date/2009-02-18.html#23:49 and the solution: http://clojure-log.n01se.net/date/2009-02-19.html#0:30 On Wed, Mar 18, 2009 at 11:03 AM, Konrad Hinsen wrote: > > Consider the following session: > > user=> / > # > user=> clojure.core// > #

Re: vimclojure problem (have browsed other threads)

2009-03-18 Thread Notfonk
arf ... now i feel stupid anyway thanks for that :) i think i spent too long on that and became too stupid to see something that obvious. Everything works now On Mar 18, 6:19 pm, Meikel Brandmeyer wrote: > Hi, > > Am 18.03.2009 um 17:06 schrieb Notfonk: > > > java.lang.NoClassDefFoundError: cl

Re: Unit Testing Macros

2009-03-18 Thread Sean
Thanks to everyone who replied. After looking at the examples & a night's sleep, this makes sense. On Mar 18, 12:38 pm, Stuart Sierra wrote: > On Mar 17, 6:06 pm, Sean wrote: > > >    I'm writing a macro library for myself, and I'm thinking about > > publishing it.  Before I do so, I'd like to

Re: reload modified java class

2009-03-18 Thread Victor Rodriguez
On Wed, Mar 18, 2009 at 3:11 AM, linh wrote: > > Emacs and slime works fine for me, but I'm willing to try other > alternatives. > Thanks for the tip. You can launch clojure-swank from Eclipse, then you will have Emacs *and* Java code reloading. Sorry, I don't have a link handy for instructions

Re: A newbie implementation of partition-by with lazy-seq

2009-03-18 Thread atreyu
oppps sorry i suppose something is wrong with my svn client and the update didnt work,,thanks On 18 mar, 17:56, "Stephen C. Gilardi" wrote: > On Mar 18, 2009, at 12:35 PM, atreyu wrote: > > > Hi, to get compiled clj-contrib with the lastest version of clojure i > > had to rewrite partition-by an

Enlive questions

2009-03-18 Thread Phil Hagelberg
I'm using the Enlive library, and so far I've been pretty impressed. The way it separates templates out into their own files and doesn't allow any logic to get mixed up with them is great. One thing I noticed is that its templates escape all strings passed to them. In my case I have some strings

Re: filter1 interesting?

2009-03-18 Thread Rob
How about using "find", and renaming the current "find" to "get- entry"? I haven't used the current `find' function much. Does anyone? I don't see it used once in the .clj files in Clojure itself. Maybe it doesn't warrant the short name. Rob --~--~-~--~~~---~--~---

Re: Slash mystery

2009-03-18 Thread Michael Wood
On Wed, Mar 18, 2009 at 8:22 PM, Kevin Downey wrote: > > this came up on irc starting: > http://clojure-log.n01se.net/date/2009-02-18.html#23:49 > and the solution: > http://clojure-log.n01se.net/date/2009-02-19.html#0:30 Interesting. I noticed something similar the other day: user=> (defn ...

Going to ILC 2009?

2009-03-18 Thread Chas Emerick
I am (from Sunday - Tuesday, anyway), along with another fellow from Snowtide, and I think it'd be great to meet up with some other Clojure programmers who might be there, too. I'm sure such things will happen naturally, but I thought I'd start a thread here so that people who are going c

Re: Going to ILC 2009?

2009-03-18 Thread Chouser
On Wed, Mar 18, 2009 at 4:22 PM, Chas Emerick wrote: > > I am (from Sunday - Tuesday, anyway), along with another fellow from > Snowtide, and I think it'd be great to meet up with some other Clojure > programmers who might be there, too.  I'm sure such things will happen > naturally, but I though

Re: Slash mystery

2009-03-18 Thread Kevin Downey
Symbols starting and ending with "." are reserved. see http://clojure.org/reader the section on Symbols On Wed, Mar 18, 2009 at 12:58 PM, Michael Wood wrote: > > On Wed, Mar 18, 2009 at 8:22 PM, Kevin Downey wrote: >> >> this came up on irc starting: >> http://clojure-log.n01se.net/date/2009-02

Re: Enlive questions

2009-03-18 Thread Tom Hickey
Hi Phil, Regarding your first question, you can use (net.cgrand.enlive-html/ escaped your-string) to skip the escaping of your strings. Cheers, Tom On Mar 18, 3:47 pm, Phil Hagelberg wrote: > I'm using the Enlive library, and so far I've been pretty impressed. The > way it separates templates

Re: Going to ILC 2009?

2009-03-18 Thread Phil Hagelberg
Chas Emerick writes: > I am (from Sunday - Tuesday, anyway), along with another fellow from > Snowtide, and I think it'd be great to meet up with some other Clojure > programmers who might be there, too. I'm sure such things will happen > naturally, but I thought I'd start a thread here s

Re: Going to ILC 2009?

2009-03-18 Thread Chas Emerick
One additional thought: if anyone wants to set up something at the last minute (as these things often are), I'd suggest twittering with an appropriate hashtag (i.e. #clojureilc, perhaps) so that like-minded folks can flock to the right spot. - Chas On Mar 18, 2009, at 4:22 PM, Chas Emerick

Re: Going to ILC 2009?

2009-03-18 Thread Tom Hickey
I will be there on Sunday (sporting my Clojure pin!) along with Eric and Narayan from the enclojure crew. Cheers, Tom On Mar 18, 4:22 pm, Chas Emerick wrote: > I am (from Sunday - Tuesday, anyway), along with another fellow from > Snowtide, and I think it'd be great to meet up with some other C

Re: reload modified java class

2009-03-18 Thread Laurent PETIT
Hello, 2009/3/18 Victor Rodriguez > > On Wed, Mar 18, 2009 at 3:11 AM, linh wrote: > > > > Emacs and slime works fine for me, but I'm willing to try other > > alternatives. > > Thanks for the tip. > > You can launch clojure-swank from Eclipse, then you will have Emacs > *and* Java code reloadin

Re: lazy-cons

2009-03-18 Thread Kevin Downey
the api doc documents the latest release of clojure, which is the pre-lazy release from back in december I believe. On Wed, Mar 18, 2009 at 3:59 AM, Notfonk wrote: > > Hey > > i'm not sure this is the right place to post that > > Could you please remove lazy-cons from the api doc ? I'm a newbie

Optional dependencies

2009-03-18 Thread Meikel Brandmeyer
Dear Clojurians, I found the following procedure quite useful when including Tom Faulhaber's cl-format in VimClojure. I didn't want to depend on it, so I decided to provide the functionality optionally: if the cl-format.jar is available use it, otherwise use some sensible default. The following

Re: Optional dependencies

2009-03-18 Thread Laurent PETIT
Cool ! And by encapsulating this Voodoo code : (try (load "optional/cl-format") (catch Exception exc (when-not (re-find #"com/infolace/format__init" (str exc)) (throw exc into a proper function named e.g. load-optional, you have then a small library (clojure.contrib.optional ?) in i

Re: Enlive questions

2009-03-18 Thread Phil Hagelberg
Tom Hickey writes: > Regarding your first question, you can use (net.cgrand.enlive-html/ > escaped your-string) to skip the escaping of your strings. Thanks, that's helpful. I've also noticed one more oddity. Consider this snippet: (deftemplate index "foo/bar/template.html" [articles] [:div

Re: lazy-cons

2009-03-18 Thread Notfonk
Yeah, this makes perfect sense on second thought. I still think this should be emphasised more, somewhere. On every introduction to closure you will find, you're told to use the svn version. So maybe there should be a big remainder on the api docs page saying "This is not the doc for the SVN vers

Re: Request Feedback on Clojure Blog Article

2009-03-18 Thread e
just started reading it and already have some new perspectives. Like, I didn't really know that "let" variables could depend on each other. I would have expected that to be let*, but I just looked in the API, and I don't see a let*, which seems odd to me. What's that all about? Secondly, also a

Re: Request Feedback on Clojure Blog Article

2009-03-18 Thread e
i agree with the comment there that your article is a nice, gentle introduction that makes me go, "cool, now pick another clojure topic. I'm ready to read it" -- maybe concureny? On Thu, Mar 19, 2009 at 12:28 AM, e wrote: > just started reading it and already have some new perspectives. Like,

Re: Request Feedback on Clojure Blog Article

2009-03-18 Thread Stephen C. Gilardi
On Mar 19, 2009, at 12:28 AM, e wrote: just started reading it and already have some new perspectives. Like, I didn't really know that "let" variables could depend on each other. I would have expected that to be let*, but I just looked in the API, and I don't see a let*, which seems odd

Re: Request Feedback on Clojure Blog Article

2009-03-18 Thread Stephen C. Gilardi
On Mar 19, 2009, at 12:28 AM, e wrote: just started reading it and already have some new perspectives. Like, I didn't really know that "let" variables could depend on each other. I would have expected that to be let*, but I just looked in the API, and I don't see a let*, which seems odd

Re: Request Feedback on Clojure Blog Article

2009-03-18 Thread Mark Engelberg
On Wed, Mar 18, 2009 at 10:40 PM, Stephen C. Gilardi wrote: > Because parallel bindings are also useful, I think it's an interesting idea > to extend let to allow it to take parallel bindings in a map instead of a > vector. These would act like Common Lisp's "let": > >        (def a 4) >        (