ANN: CDT - The Clojure Debugging Toolkit

2010-07-05 Thread George Jahad
My experiment with the JDI:


http://georgejahad.com/clojure/cdt.html

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Laurent PETIT
2010/7/6 Sean Corfield :
> On Mon, Jul 5, 2010 at 9:24 PM, Sean Corfield  wrote:
>> No, I hadn't found it painful in my brief run around with CCW over the
>> last few days... I hadn't even noticed the defaults were different :|
>
> And I should probably add that I switched over to strict mode pretty
> much immediately and I much prefer the behavior of brackets that way
> (I deal with a lot of language plugins and some follow this path and
> some don't and I get far more frustrated with the ones where I end up
> with *&%$ like ()) and []] and constantly have to delete characters
> and move the cursor right!).

Seems like people definitely don't like automatic closing bracket
insertion in the default mode. Guess I'm gonna remove this from the
default mode then, if it does more harm than anything ...

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Sean Corfield
On Mon, Jul 5, 2010 at 9:24 PM, Sean Corfield  wrote:
> No, I hadn't found it painful in my brief run around with CCW over the
> last few days... I hadn't even noticed the defaults were different :|

And I should probably add that I switched over to strict mode pretty
much immediately and I much prefer the behavior of brackets that way
(I deal with a lot of language plugins and some follow this path and
some don't and I get far more frustrated with the ones where I end up
with *&%$ like ()) and []] and constantly have to delete characters
and move the cursor right!).
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Sean Corfield
On Mon, Jul 5, 2010 at 5:05 AM, Chas Emerick  wrote:
> As a tangent, does anyone else find the default structural editing shortcuts
> fairly painful, e.g. overriding Mac defaults for goto-end-of-line,
> select-next-word, etc?

No, I hadn't found it painful in my brief run around with CCW over the
last few days... I hadn't even noticed the defaults were different :|
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Documentation and examples (and where is the documentation on reduce)?

2010-07-05 Thread Justin Kramer
I've integrated your suggestions into the wiki's guidelines:

http://clojure-examples.appspot.com/guidelines

Feel free to add anything else that needs mentioning. There's also a
talk page for discussion.

Justin

On Jul 2, 6:37 pm, Mike Meyer  wrote:
> On Fri, 2 Jul 2010 14:50:18 -0700 (PDT)
>
> Justin Kramer  wrote:
> > Nice, Mike. I stole your work and put it into the Wiki I created to
> > see how it fit:
>
> >http://clojure-examples.appspot.com/clojure.core/reduce
>
> Well, I like it, but I might be a bit biased.
>
> I think the important part is the rules that went into picking the
> examples. I just picked examples from Walton that followed them,
> tweaked those to build up properly, and then added the edge
> cases.http://clojure-examples.appspot.com/guidelinesactually covers
> it, but my version was more explicit, and gave a why.
>
> Cleaning mine version up and combining them gives:
>
> * Keep it simple and self contained
>   - the first example shouldn't require knowing anything but clojure syntax
>   - the inputs to an example should either be literals or simple expressions
>   - the user shouldn't have to figure out anything but the new concept or type
> * Build up examples cumulatively
>   - each example should introduce at most one new concept
>   - or reinforce the previous example (though that should be kept to a 
> minimum)
>   - or show the function working on a new data type
>
> I'd go ahead and edit the page, but figure you might want to such a
> change beforehand.
>
>         --
> Mike Meyer           http://www.mired.org/consulting.html
> Independent Network/Unix/Perforce consultant, email for more information.
>
> O< ascii ribbon campaign - stop html mail -www.asciiribbon.org

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Lee Spector

On Jul 5, 2010, at 4:52 PM, Laurent PETIT wrote:
> Sorry if I offensed you by suggesting you didn't "get" the virtues of
> homoïconicity ! I would love to hear details on what a good structure
> editor (not just a semi-editor like paredit) looks like !

No offense taken. I'll see if I can find any more about the Interlisp-D 
structure editor... but again it's possible that its virtues are in my 
imagination, the products wishful false memory.

I guess what I was getting at, though, is that while I appreciate 
structure-oriented editing conceptually, and would love to have 
structure-oriented editing support, that's a different beast from "partial yet 
mandatory," structure-based editing that prevents one from typing free-form 
when one wants to. I'm pretty sure I'll always prefer free-form text editing 
(with auto-indenting and syntax coloring and sure, structure-based commands 
that are available but not mandatory) to the partial, mandatory type of system.

> BTW, if you feel like you could help improve the documentation of some
> parts of ccw on the wiki or the Eclipse online help, you're very
> welcome :-)

I will try to do so as I become more confident that I know what I'm talking 
about!

Thanks,

 -Lee

--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspec...@hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438

Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Lee Spector

On Jul 5, 2010, at 4:49 PM, Laurent PETIT wrote:

> But I could define both Tab
> and Ctrl+I (the eclipse's way of reindenting, though I find it pretty
> hard to use on a regular basis) for reindenting the current line.

inc

Are there objections to defining both to do re-indentation? Eclipse natives 
would find what they expect and so would people who came from emacs and some 
other lisp editors that use tab. I'd personally probably use tab because it's 
less key presses and because it make sense to me conceptually, that tab would 
do re-indentation.

--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspec...@hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438

Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Laurent PETIT
OK.

Concerning the specific "indent line" issue, I guess I'll finally do
the following :
  * align the default way of re-indenting a line with the Eclipse
standard, e.g. Ctrl+I on Windows/Linux (what is it for Mac ?)
* this way this can be overriden by the user via the Window >
Preferences > General > Keys menu
* but (there's a but), it's not possible in Eclipse to redefine
the behaviour of the Tab key from the above mentioned menu, so:
  * create a configuration flag for the behaviour of the Tab key.
* Make this behaviour orthogonal to the currently enabled
structural editing mode (Default or Strict)
* Make the default behaviour be the reindentation of the current line
* The flag will be accessible as usual from Window > Preferences >
Clojure > Editor menu

2010/7/5 Laurent PETIT :
> 2010/7/5 Lee Spector :
>>
>> On Jul 4, 2010, at 6:46 PM, Laurent PETIT wrote:
>>>
>>> I guess I could make the Tab-as-indent-line behavior go back to the
>>> default mode, and introduce the
>>> Esc.-as-no-interpretation-by-the-editor-for-the-nex-keystroke . So
>>> people wanting to insert a real tab could do it by first hitting the
>>> Esc. key first.
>>
>> From where I currently sit that would be quite helpful.
>>
>>> Maybe you're not "embracing" the source-code as data to its full
>>> extent ? I was not -and still am not- an emacs/paredit.el user, but
>>> now I can't go back to the default mode. I'm thinking about my code
>>> more and more in terms of forms, not in terms of a begin-to-end flow
>>> of characters. Just to give you a powerful example : [deleted]
>>
>> I find this a little funny because my unshared reaction to the recent 
>> discussion about "The Lisp Way" in the thread on "the joys of lisp" thread 
>> was that for me the Lisp Way is mostly about source-code as data (aka 
>> homoiconicity). From macros to genetic programming (one of my research 
>> areas) homoiconicity is core to my view of Lisp and of the way that I wish 
>> all programming languages work. So I embrace it!
>>
>> I think what I don't embrace (yet -- maybe I'll come around) are the way 
>> that the the current implementation interacts with typing, the way it 
>> prevents you from sketching out code in a structurally invalid way (which is 
>> sometimes the way my mind works), and the way that knowledge of how it's 
>> going to react to typing is necessary to type anything correctly. You have 
>> to be thinking about its rules as well as about the code. Of course once you 
>> internalize the rules then I can see it would be great, but the interaction 
>> with ordinary typing and the initial "opacity" of the system's rules aren't 
>> so great IMHO.
>>
>> My favorite Lisp editing environment ever, although I probably misremember 
>> it because I haven't seen it for something like 25 years, was the 
>> Interlisp-D environment on Xerox Dandelion machines. I wish I could find 
>> some screen snaps online, but I haven't yet. In any event, it was based 
>> around the concept of structure editing but I don't recall it interfering 
>> with typing or that I had to predict its behavior or move around things that 
>> it typed, etc. That really might be flaws in my memory (anyone else here 
>> work with those)? In any event I am SURE there were structure-oriented 
>> buttons that you could click to add parentheses and do other handy structure 
>> editing things. As I recall it this made it relatively easy to do the kinds 
>> of things that you illustrate with your example, but no memorization of key 
>> stroke combinations was required and ordinary meanings of common keys (like 
>> "(") weren't overridden.
>>
>> At least that's how I recall it, although it may be a mangled memory. In any 
>> event, maybe I can grow to love the CCW approach to this but FWIW my issue 
>> isn't about "source code as data," it's about the mechanics of the user 
>> interface.
>>
>> One other cool thing that I remember about the Interlisp-D code editor, btw, 
>> is that it maintained two selections -- the most recent one and the one from 
>> before that, with the most recent underlined and the 2nd most recent 
>> underlined with a dotted line -- and there were some button-based editing 
>> functions that worked with this. For example, with one click you'd swap the 
>> two selected expressions, and I think there were others.
>>
>
> Sorry if I offensed you by suggesting you didn't "get" the virtues of
> homoïconicity ! I would love to hear details on what a good structure
> editor (not just a semi-editor like paredit) looks like !
>
> Oh, this for sure is a bug ! Lau Jensen opened an issue for it [etc]
 Great!
>>>
>>> btw, now fixed in my local branch !
>>
>> Wonderful!
>>
 There will be an interaction between this and the automatic insertion. If 
 you get rid of automatic insertion (which I would prefer) then if the I 
 type "(defn foo" and hit return then the parentheses will be unbalanced 
 (globally), so unless this issue is resolved th

Re: auto-indent in Counterclockwise

2010-07-05 Thread Laurent PETIT
2010/7/5 Lee Spector :
>
> On Jul 4, 2010, at 6:46 PM, Laurent PETIT wrote:
>>
>> I guess I could make the Tab-as-indent-line behavior go back to the
>> default mode, and introduce the
>> Esc.-as-no-interpretation-by-the-editor-for-the-nex-keystroke . So
>> people wanting to insert a real tab could do it by first hitting the
>> Esc. key first.
>
> From where I currently sit that would be quite helpful.
>
>> Maybe you're not "embracing" the source-code as data to its full
>> extent ? I was not -and still am not- an emacs/paredit.el user, but
>> now I can't go back to the default mode. I'm thinking about my code
>> more and more in terms of forms, not in terms of a begin-to-end flow
>> of characters. Just to give you a powerful example : [deleted]
>
> I find this a little funny because my unshared reaction to the recent 
> discussion about "The Lisp Way" in the thread on "the joys of lisp" thread 
> was that for me the Lisp Way is mostly about source-code as data (aka 
> homoiconicity). From macros to genetic programming (one of my research areas) 
> homoiconicity is core to my view of Lisp and of the way that I wish all 
> programming languages work. So I embrace it!
>
> I think what I don't embrace (yet -- maybe I'll come around) are the way that 
> the the current implementation interacts with typing, the way it prevents you 
> from sketching out code in a structurally invalid way (which is sometimes the 
> way my mind works), and the way that knowledge of how it's going to react to 
> typing is necessary to type anything correctly. You have to be thinking about 
> its rules as well as about the code. Of course once you internalize the rules 
> then I can see it would be great, but the interaction with ordinary typing 
> and the initial "opacity" of the system's rules aren't so great IMHO.
>
> My favorite Lisp editing environment ever, although I probably misremember it 
> because I haven't seen it for something like 25 years, was the Interlisp-D 
> environment on Xerox Dandelion machines. I wish I could find some screen 
> snaps online, but I haven't yet. In any event, it was based around the 
> concept of structure editing but I don't recall it interfering with typing or 
> that I had to predict its behavior or move around things that it typed, etc. 
> That really might be flaws in my memory (anyone else here work with those)? 
> In any event I am SURE there were structure-oriented buttons that you could 
> click to add parentheses and do other handy structure editing things. As I 
> recall it this made it relatively easy to do the kinds of things that you 
> illustrate with your example, but no memorization of key stroke combinations 
> was required and ordinary meanings of common keys (like "(") weren't 
> overridden.
>
> At least that's how I recall it, although it may be a mangled memory. In any 
> event, maybe I can grow to love the CCW approach to this but FWIW my issue 
> isn't about "source code as data," it's about the mechanics of the user 
> interface.
>
> One other cool thing that I remember about the Interlisp-D code editor, btw, 
> is that it maintained two selections -- the most recent one and the one from 
> before that, with the most recent underlined and the 2nd most recent 
> underlined with a dotted line -- and there were some button-based editing 
> functions that worked with this. For example, with one click you'd swap the 
> two selected expressions, and I think there were others.
>

Sorry if I offensed you by suggesting you didn't "get" the virtues of
homoïconicity ! I would love to hear details on what a good structure
editor (not just a semi-editor like paredit) looks like !

 Oh, this for sure is a bug ! Lau Jensen opened an issue for it [etc]
>>> Great!
>>
>> btw, now fixed in my local branch !
>
> Wonderful!
>
>>> There will be an interaction between this and the automatic insertion. If 
>>> you get rid of automatic insertion (which I would prefer) then if the I 
>>> type "(defn foo" and hit return then the parentheses will be unbalanced 
>>> (globally), so unless this issue is resolved the next line couldn't be 
>>> indented at all. That wouldn't be very helpful.
>>
>> Sincerely, I'll make everything in my power to get it back.
>
> Wonderful!
>
>> In fact - but maybe I'm saying that because "it's my baby and I'm used
>> to his strengths and weaknesses" :-) -, when in Strict mode, I don't
>> see the {, (, ", [ keys as characters anymore: they are commands for
>> structurally editing the code: ( means create a new block, not add the
>> ( character. ) means jump to the end of the ancestor ) (not
>> necessarily the parent form). Maybe "switching" perspective to this
>> angle may help. But I can understand that it may resemble "dark
>> magic", so maybe explaining it a little bit more may help.
>
>
> That makes sense, and that may be the best way to explain it. (For example 
> "In the Strict mode several keys that would ordinarily produce characters are 
> instead treated as 

Re: auto-indent in Counterclockwise

2010-07-05 Thread Laurent PETIT
Hi Chas,

2010/7/5 Chas Emerick :
>
> On Jul 4, 2010, at 4:10 PM, Laurent PETIT wrote:
>
>>> I know talk is cheap and beggars can't be choosers, etc., but FWIW I
>>> would prefer to have something close to the "default" mode but with tab (or
>>> some other key)
>>
>> The default "reindent line" keyboard shortcut in Eclipse is Ctrl+I.
>> Would this be acceptable to you ? I chose Tab because emacs did this,
>> and I found this easier to type than Ctrl+I, given that we may type
>> this quite a lot ?
>
> A remarkably small point, but I'd strongly suggest aligning default key
> shortcuts for common features with the defaults of the IDE in question,
> Eclipse in this case.  All of the IDEs have very capable keymappers
> built-in, so personal preferences and idioms from unrelated environments
> probably shouldn't be relevant.

It's interesting that you're saying this, because I've tried my best
to keep with Eclipse standards whenever possible (and when I was aware
such a standard existed).
For the Tab story, currently tab is not "grokked" by the "command"
system, but rather directly by the editor. But I could define both Tab
and Ctrl+I (the eclipse's way of reindenting, though I find it pretty
hard to use on a regular basis) for reindenting the current line.

Hmm, it seems that people are still separate in two camps concerning
this feature ... :)

> As a tangent, does anyone else find the default structural editing shortcuts
> fairly painful, e.g. overriding Mac defaults for goto-end-of-line,
> select-next-word, etc?

On Ubuntu, they are somewhat aligned with their corresponding meaning
in other structure based editors. If you can come up with a better (as
in approved by other Mac users) set of default keyboard bindings for
Mac, I would be glad to change these defaults, no problem. But since
I'm not a Mac user myself, it's up to you to be precise (what replaces
what) about the new bindings.

Regards,

-- 
Laurent

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Online Clojure for beginners course starting july 19th

2010-07-05 Thread Nick Mudge
Cool. Signed up.

On Jul 4, 10:47 am, Arie van Wingerden  wrote:
> Hi,
>
> at Rubylearning.org a course on Clojure will be taught soon. See the details
> here ...
>    http://rubylearning.com/blog/2010/07/04/new-course-clojure-for-beginn...
>
> The course starts july 19th and lasts for a week.
>
> Kind regards,
>    Arie

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How Do I Tell Clojure Which Classloader to Use?

2010-07-05 Thread Nick Mudge
Is there a way to tell which classloader clojure is using?


On Jul 5, 4:53 am, Chas Emerick  wrote:
> Clojure does use the context classloader by default for its "root"  
> classloader (on top of which it sometimes creates new  
> DynamicCLassloaders).  This behaviour is controlled by the value of  
> *use-context-classloader*, which is true by default.
>
> I don't have any java web start experience, so I'm afraid I can't  
> provide any further advice.  Anyone else here that does?
>
> - Chas
>
> On Jul 4, 2010, at 6:53 AM, Nick Mudge wrote:
>
> > I am writing a 3rd party module in Clojure for a Java Web Start
> > application written in Java.
>
> > I am using Clojure 1.1.
>
> > I think that my clojure program and clojure.jar are on the classpath
> > and are being loaded because when clojure.jar is not seen on the class
> > path this error results: java.lang.ClassNotFoundException:
> > clojure.lang.IFn
> > I am not getting that error so I think that my clojure program and
> > clojure.jar are seen on the classpath and are being loaded.
>
> > This is the error I am getting:
> > Could not locate clojure/core__init.class or clojure/core.clj on
> > classpath
>
> > I think that clojure uses the system classloader by default. Is this
> > correct? However, according to the Java Web Start documentation, the
> > system classloader doesn't work with Java Web Start:
> >http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq
>
> > The Java Web Start documentation says that the following classloader
> > should be used:
> > ClassLoader cl = Thread.getCurrent().getContextClassLoader();
>
> > My question is, how do I tell clojure to use this classloader so that
> > clojure can load it's own code?
>
> > --
> > 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, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/clojure?hl=en

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Online Clojure for beginners course starting july 19th

2010-07-05 Thread Nick Mudge
Cool. Signed up.
Mudge

On Jul 4, 10:47 am, Arie van Wingerden  wrote:
> Hi,
>
> at Rubylearning.org a course on Clojure will be taught soon. See the details
> here ...
>    http://rubylearning.com/blog/2010/07/04/new-course-clojure-for-beginn...
>
> The course starts july 19th and lasts for a week.
>
> Kind regards,
>    Arie

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How Do I Tell Clojure Which Classloader to Use?

2010-07-05 Thread Nick Mudge
Also I should note that all my clojure code is compiled to classes and
the classes are jarred and sent to the Java Web Start program along
with clojure.jar.


On Jul 4, 3:53 am, Nick Mudge  wrote:
> I am writing a 3rd party module in Clojure for a Java Web Start
> application written in Java.
>
> I am using Clojure 1.1.
>
> I think that my clojure program and clojure.jar are on the classpath
> and are being loaded because when clojure.jar is not seen on the class
> path this error results: java.lang.ClassNotFoundException:
> clojure.lang.IFn
> I am not getting that error so I think that my clojure program and
> clojure.jar are seen on the classpath and are being loaded.
>
> This is the error I am getting:
> Could not locate clojure/core__init.class or clojure/core.clj on
> classpath
>
> I think that clojure uses the system classloader by default. Is this
> correct? However, according to the Java Web Start documentation, the
> system classloader doesn't work with Java Web 
> Start:http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq
>
> The Java Web Start documentation says that the following classloader
> should be used:
> ClassLoader cl = Thread.getCurrent().getContextClassLoader();
>
> My question is, how do I tell clojure to use this classloader so that
> clojure can load it's own code?

-- 
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: auto-indent in Counterclockwise

2010-07-05 Thread Chas Emerick


On Jul 4, 2010, at 4:10 PM, Laurent PETIT wrote:

I know talk is cheap and beggars can't be choosers, etc., but FWIW  
I would prefer to have something close to the "default" mode but  
with tab (or some other key)


The default "reindent line" keyboard shortcut in Eclipse is Ctrl+I.
Would this be acceptable to you ? I chose Tab because emacs did this,
and I found this easier to type than Ctrl+I, given that we may type
this quite a lot ?


A remarkably small point, but I'd strongly suggest aligning default  
key shortcuts for common features with the defaults of the IDE in  
question, Eclipse in this case.  All of the IDEs have very capable  
keymappers built-in, so personal preferences and idioms from unrelated  
environments probably shouldn't be relevant.


As a tangent, does anyone else find the default structural editing  
shortcuts fairly painful, e.g. overriding Mac defaults for goto-end-of- 
line, select-next-word, etc?


- Chas

--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: How Do I Tell Clojure Which Classloader to Use?

2010-07-05 Thread Chas Emerick
Clojure does use the context classloader by default for its "root"  
classloader (on top of which it sometimes creates new  
DynamicCLassloaders).  This behaviour is controlled by the value of  
*use-context-classloader*, which is true by default.


I don't have any java web start experience, so I'm afraid I can't  
provide any further advice.  Anyone else here that does?


- Chas

On Jul 4, 2010, at 6:53 AM, Nick Mudge wrote:


I am writing a 3rd party module in Clojure for a Java Web Start
application written in Java.

I am using Clojure 1.1.

I think that my clojure program and clojure.jar are on the classpath
and are being loaded because when clojure.jar is not seen on the class
path this error results: java.lang.ClassNotFoundException:
clojure.lang.IFn
I am not getting that error so I think that my clojure program and
clojure.jar are seen on the classpath and are being loaded.

This is the error I am getting:
Could not locate clojure/core__init.class or clojure/core.clj on
classpath

I think that clojure uses the system classloader by default. Is this
correct? However, according to the Java Web Start documentation, the
system classloader doesn't work with Java Web Start:
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html#211

The Java Web Start documentation says that the following classloader
should be used:
ClassLoader cl = Thread.getCurrent().getContextClassLoader();

My question is, how do I tell clojure to use this classloader so that
clojure can load it's own code?

--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


--
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, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en