Calling J from Python
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Mon Feb 5 15:27:23 EST 2007
Diez B. Roggisch a écrit :
> Gosi wrote:
>
>
>>On Feb 5, 2:59 pm, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
>>
>>>Gosi wrote:
>>>
>>>>It is quite easy to call J from Python
>>>
>>>http://groups.google.com/group/J-Programming/browse_thread/thread/5e8...
>>>
>>>What is J, and why should we care?
>>>
>>>Diez
>>
>>J is in many ways similar to Python.
>>
>>J has very many advanced operations.
>
>
> What exactly do you call "similar to python" when the following is a program
> written in it? Compared to that, even Perl is a wonder of readability...
>
> 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
Yuck. I'd rather program in b**k.
More information about the Python-list
mailing list