I seem to be talking to myself but I've been told that if I find a
solution to a problem I should share it.  I understand that deftype,
defprotocol, and defrecord are pretty volatile in development and my
eclipse plugin is simply using an old version of clojure.

On Aug 31, 11:37 am, Jarl Haggerty <fictivela...@gmail.com> wrote:
> The full error is
>
> No implementation of method: :arraySet of protocol: #'ndarray.NDArray/
> ArrayProtocol found for class: ndarray.NDArray.NDArray (NDArray.clj:0)
>
> and the code is this
>
> (ns ndarray.NDArray
>   (:import java.lang.Object))
>
> (def ... (reify Object))
>
> (defprotocol ArrayProtocol
>   (fixIndex [this where axis])
>   (component [this axis where])
>   (arraySet [this indices]))
>
> (deftype NDArray [dimensions strides strideOverwrites start data]
>   ArrayProtocol
>   (arraySet [this indices] "SET")
>   (fixIndex [this where axis] nil)
>   (component [this axis where] nil))
>
> (defn arange [& input]
>   (let [data (apply range input)]
>            (NDArray. [(count data)] [1] [] 0 data)))
> (println (arraySet (arange 20) nil))
>
> I've been at this for a while now and while typing a small defprotocol
> and small defrecord into an interpreter works putting this in Eclipse
> gives me the error.

-- 
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

Reply via email to