Re: documentation for clojure core extension points - multimethods and protocols?

2013-02-22 Thread Dave Sann
1.4.0 protocols

$ find . -name "*.clj" -exec grep "defprotocol" \{\} \; -print -printf "\n"
(defprotocol Reflector
(defprotocol TypeReference
./src/clj/clojure/reflect.clj

(defprotocol ClassResolver
./src/clj/clojure/reflect/java.clj

(defprotocol ^{:added "1.2"} Coercions
(defprotocol ^{:added "1.2"} IOFactory
./src/clj/clojure/java/io.clj

(defprotocol ^{:added "1.3"} EqualityPartition
(defprotocol ^{:added "1.3"} Diff
./src/clj/clojure/data.clj

(defmacro defprotocol 
  (defprotocol AProtocolName
  Java parlance). defprotocol is dynamic, has no special compile-time 
  defprotocol will automatically generate a corresponding interface,
  (defprotocol P 
./src/clj/clojure/core_deftype.clj

(defprotocol CollReduce
(defprotocol InternalReduce
(defprotocol IKVReduce
./src/clj/clojure/core/protocols.clj

(defprotocol HintedProtocol
./test/clojure/test_clojure/compilation.clj

(eval '(defprotocol Elusive (old-method [x])))
(eval '(defprotocol Elusive (new-method [x])))
(defprotocol SyntaxQuoteTestProtocol
./test/clojure/test_clojure/protocols.clj

(defprotocol TestProtocolA
(defprotocol TestProtocolB
./test/clojure/test_clojure/protocols/hash_collisions.clj

(defprotocol ExampleProtocol
./test/clojure/test_clojure/protocols/examples.clj

(defprotocol SimpleProtocol
./test/clojure/test_clojure/protocols/more_examples.clj

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: documentation for clojure core extension points - multimethods and protocols?

2013-02-22 Thread Dave Sann
This is for 1.4.0. Multi methods.

(Filenames come after)
 
(the two methods in dispatch are: simple-dispatch, code-dispatch
add -A 1 option to the grep to see this)


$ find . -name "*.clj" -exec grep "defmulti" \{\} \; -print -printf "\n"
(defmulti 
(defmulti 
./src/clj/clojure/pprint/dispatch.clj

(defmulti ^{:private true} write-token #(:type-tag %2))
(defmulti ^{:private true} emit-nl? (fn [t _ _ _] (:type t)))
(defmulti ^{:private true} tok :type-tag)
./src/clj/clojure/pprint/pretty_writer.clj

(defmulti
./src/clj/clojure/java/io.clj

(defmacro defmulti
  (throw (Exception. "The syntax for defmulti has changed. Example: 
(defmulti name dispatch-fn :default dispatch-value)")))
(defmulti print-method (fn [x writer]
(defmulti print-dup (fn [x writer] (class x)))
./src/clj/clojure/core.clj

(defmulti is-leaf collection-tag)
(defmulti get-child (fn [parent index] (collection-tag parent)))
(defmulti get-child-count collection-tag)
(defmulti list-provider class)
(defmulti table-model class)
./src/clj/clojure/inspector.clj

(defmulti ^:dynamic junit-report :type)
./src/clj/clojure/test/junit.clj

(defmulti ^:dynamic tap-report (fn [data] (:type data)))
./src/clj/clojure/test/tap.clj

(defmulti
(defmulti assert-expr 
(defmulti use-fixtures
./src/clj/clojure/test.clj

(defmulti 
./test/clojure/test_clojure/pprint/test_pretty.clj

; defmulti
./test/clojure/test_clojure/multimethods.clj

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: documentation for clojure core extension points - multimethods and protocols?

2013-02-22 Thread Akhil Wali
Please do post :)
On Feb 22, 2013 7:08 PM, "Ambrose Bonnaire-Sergeant" <
abonnaireserge...@gmail.com> wrote:

> Yes please.
>
> On Fri, Feb 22, 2013 at 9:37 PM, Dave Sann  wrote:
>
>> I did this.
>>
>> There are actually not many protocols. Likely because most of the
>> original underlying implementation in terms of java interfaces.
>>
>> Few multi-methods beyond print-method stood out.
>>
>> I can post the output if anyone is interested.
>>
>> Dave
>>
>>
>> On Friday, 22 February 2013 21:51:06 UTC+11, Andrew Sernyak wrote:
>>>
>>> I guess you should just grep clojure core source for defprotocol,
>>> defmulti and so on.
>>
>>  --
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: documentation for clojure core extension points - multimethods and protocols?

2013-02-22 Thread Dave Sann
I did this.

There are actually not many protocols. Likely because most of the original 
underlying implementation in terms of java interfaces.

Few multi-methods beyond print-method stood out.

I can post the output if anyone is interested.

Dave

On Friday, 22 February 2013 21:51:06 UTC+11, Andrew Sernyak wrote:
>
> I guess you should just grep clojure core source for defprotocol, defmulti 
> and so on. 

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: documentation for clojure core extension points - multimethods and protocols?

2013-02-22 Thread Andrew Sernyak
I guess you should just grep clojure core source for defprotocol, defmulti 
and so on. 

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




documentation for clojure core extension points - multimethods and protocols?

2013-02-21 Thread Dave Sann
Does anyone have a good source of summary documentation for core clojure 
"extension points"

My this I mean either defined multi-methods that are intended to be 
extended, such as print-method, or Protocols that are intended to be 
re-used?

Is there similar for clojurescript?

just curious at the moment.

ta

Dave


-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.