Calling J from Python
Laurent Pointal
laurent.pointal at wanadoo.fr
Mon Feb 5 13:38:04 EST 2007
Diez B. Roggisch wrote:
> m =: >@(0&{)
> v =: >@(1&{)
> h =: >@(2&{)
> qu =: >@(3&{)
> z =: i. at 0:
> ret =: |.@}:
> init =: z;z;z;i.
> f1m =: (m,{. at qu);v;h;}. at qu
> f5m =: (z;(v,{:@m);h;qu,ret at m) @ (f1m^:5)
> f1h =: (z;z;(h,{:@v);(qu,ret at v)) @ (f5m^:12)
> f12h =: (z;z;z;qu,ret at h,{:@h) @ (f1h^:12)
> perm =: qu @ f12h @ init
> ord =: *./ @ (#&>"_) @ C.
> days =: -: @ ord @ perm
>
>
> http://www.jsoftware.com/jwiki/Essays/The_Ball_Clock_Problem
>
>
> Diez
Why dont they call it "smiley" ?
Operators: :-) :) :o) :-$ *<¦:O) XD -_- +_+ ^_^ *_* !_!
>_< =_= o_o X_X -_o ;) $_$ <_< >_> o_0
><_>< ?_? '_' O.O $.$ T.T ._. u.u >-<" =] {-_-}
(source: http://en.wikipedia.org/wiki/Smiley )
More information about the Python-list
mailing list