*print-dup* and subvec

2011-03-17 Thread Carson
In Clojure 1.2, I tried this: (read-string (binding [*print-dup* true] (print-str (subvec [1 2 3] 1 But I get a java.lang.IllegalArgumentException: No matching method found: create I had something else print-dup'ed out onto disk and when I read it back in it gave me that

Re: Clojure Editor

2011-03-17 Thread WoodHacker
Bluefish does not work that way.It will indent to the last indentation in all cases. I've never used EMacs, but all the editors I've ever used work indenting the same way. All I can suggest is that you ask the Bluefish users group if there is a way to do what you want. On Mar 16, 9:16 

Re: Clojure Editor

2011-03-17 Thread Lee Spector
On Mar 17, 2011, at 7:16 AM, WoodHacker wrote: Bluefish does not work that way.It will indent to the last indentation in all cases. I've never used EMacs, but all the editors I've ever used work indenting the same way. All I can suggest is that you ask the Bluefish users group if

Re: *print-dup* and subvec

2011-03-17 Thread Stuart Sierra
`print-dup` on any collection type generates code to call the `create` method of the collection's class. `APersistentVector$SubVector` is missing a `create` method. -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Clojure Editor

2011-03-17 Thread James Reeves
On 17 March 2011 12:05, Lee Spector lspec...@hampshire.edu wrote: FWIW the feature I describe (syntax-aware auto-indenting) is common in the Lisp world, not only in emacs but also (to name just a few that are fresh in my memory) in MCL, DrScheme and LispWorks. It's also common in many other

concise description of SLIME indentation rules?

2011-03-17 Thread Lee Spector
Does anyone know of a concise description of the default rules that SLIME uses to auto-indent code? I'd like to tell the Bluefish community what it would be nice to have in their Clojure mode. I've tried some web searches and found this surprisingly hard to dig up -- tons of stuff on

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Laurent PETIT
You find hard to tell the rules, and so did I. And that's why I've tried to do with ccw the simplest thing that would be better than nothing as far as auto indentation is concerned. 2011/3/17 Lee Spector lspec...@hampshire.edu Does anyone know of a concise description of the default rules

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Meikel Brandmeyer
Hi, On 17 Mrz., 16:24, Lee Spector lspec...@hampshire.edu wrote: Does anyone know of a concise description of the default rules that SLIME uses to auto-indent code? I'd like to tell the Bluefish community what it would be nice to have in their Clojure mode. I've tried some web searches and

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Tassilo Horn
Lee Spector lspec...@hampshire.edu writes: Hi Lee, Does anyone know of a concise description of the default rules that SLIME uses to auto-indent code? AFAICT, SLIME doesn't have on own indentation function but uses standard emacs lisp-mode indentation. That can be tweaked somehow, to provide

strint and macro expansion

2011-03-17 Thread Bhinderwala, Shoeb
I have the following definitions and am trying to use the strint macro () to perform string substitutions. test1=(use 'clojure.contrib.strint) test1= (def m {:XYZ 1, :ABC 2}) test1= (def q select ~(:XYZ m) from ~(:ABC m)) The following works when I specify my string directly: test1= ( select

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Meikel Brandmeyer
Hi, here are the special cases for 2 above is currently defined as default in VimClojure: setlocal lispwords=def,def-,defn,defn-,defmacro,defmacro-,defmethod,defmulti setlocal lispwords +=defonce,defvar,defvar-,defunbound,let,fn,letfn,binding,proxy setlocal lispwords

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Lee Spector
There do have to be at least a few other rules, however, e.g. about how far to outdent after an expression closes. -Lee On Mar 17, 2011, at 12:14 PM, Lee Spector wrote: Thanks Meikel! On Mar 17, 2011, at 11:40 AM, Meikel Brandmeyer wrote: I believe the Vim indentation for Lisp works

Re: strint and macro expansion

2011-03-17 Thread Alan
On Mar 17, 8:34 am, Bhinderwala, Shoeb sabhinderw...@wellington.com wrote: ...use the strint *MACRO*... ...works when I specify my string [as a literal]... ...but doesn't work when I pass the string through a variable. Macros are not functions. is receiving as arguments a list with the two

RE: strint and macro expansion

2011-03-17 Thread Bhinderwala, Shoeb
Is clojureql powerful and flexible enough to support custom dynamic SQL with tons of joins, database function invocations in the SELECT clause, sub-selects, unions, etc.? Most of our applications are written in Java and we have been doing parameter substitution sometimes using string variables

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Meikel Brandmeyer
Hi, Am 17.03.2011 um 17:33 schrieb Lee Spector: There do have to be at least a few other rules, however, e.g. about how far to outdent after an expression closes. Then you are either at the toplevel = indent 0. Or you are inside another (, [ or { which leads to the previous description.

Re: strint and macro expansion

2011-03-17 Thread Meikel Brandmeyer
Hi, Am 17.03.2011 um 18:11 schrieb Alan: From my uninformed position, strint looks like it should have been written as a function, not a macro, but probably there are reasons it was not. It can't be „simply“ a function, because then it has no access to the local environment. (let [x 99]

Re: strint and macro expansion

2011-03-17 Thread Alan
On Mar 17, 11:00 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 17.03.2011 um 18:11 schrieb Alan: From my uninformed position, strint looks like it should have been written as a function, not a macro, but probably there are reasons it was not. It can't be „simply“ a function,

Re: Clojure Editor

2011-03-17 Thread Martin DeMello
On Thu, Mar 17, 2011 at 8:35 PM, James Reeves jree...@weavejester.com wrote: On 17 March 2011 12:05, Lee Spector lspec...@hampshire.edu wrote: FWIW the feature I describe (syntax-aware auto-indenting) is common in the Lisp world, not only in emacs but also (to name just a few that are fresh in

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Laurent PETIT
Lee, while we're at it. I decided to finally give it a try, and so I implemented an alternate behaviour for smart indent for ccw : the version of the gist does the following : it uses the following function to test whether we should indent by 2 or align with the first call argument : (def

slime-eval-at-register

2011-03-17 Thread Martin Blais
Emacs-using Clojurians may enjoy the following tidbit of Slime I just dreamed of: (defun slime-eval-at-register (reg) Take the cursor to a register's location and eval the expression there. Useful for testing stuff without having to 'go there' first. (interactive cEval at register: )

Re: concise description of SLIME indentation rules?

2011-03-17 Thread Ken Wesson
On Thu, Mar 17, 2011 at 6:22 PM, Laurent PETIT laurent.pe...@gmail.com wrote: Lee, while we're at it. I decided to finally give it a try, and so I implemented an alternate behaviour for smart indent for ccw : the version of the gist does the following : it uses the following function to test

Re: strint and macro expansion

2011-03-17 Thread Chas Emerick
On Mar 17, 2011, at 2:04 PM, Alan wrote: On Mar 17, 11:00 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 17.03.2011 um 18:11 schrieb Alan: From my uninformed position, strint looks like it should have been written as a function, not a macro, but probably there are reasons it was

Re: Polymorphic functions in Clojure (or how to stop thinking in objects)...

2011-03-17 Thread stu
Hi, I wanted to take the opportunity to thank the people who responded to my question on thinking beyond O-O. The replies form a very useful slice through Clojure design strategies and idiomatic use of the language. Thanks! Stu -- You received this message because you are subscribed to the