Calling J from Python

Alexander Schmolck a.schmolck at gmail.com
Mon Feb 5 12:47:54 EST 2007


skip at pobox.com writes:

>     Gosi> J is in many ways similar to Python.
> 
>     Gosi> J has very many advanced operations.
> 
>     Gosi> http://www.jsoftware.com/
> 
> Doesn't look like open source of any variety.  If a person uses Python with
> various add-ons (RPy, numpy, matplotlib, etc) why would they want to switch
> to a closed source product?

You wouldn't, if for nothing else because python has far better scientific
libraries. If you've got an interest in programming languages as such J (or
some other APL) is worth a look though; it's also handy for quick mathematical
experimentation (J's array primitives are more expressive than what numpy
offers and python doesn't support rationals, so it's not just concise due to
perl-style crypticness). For example I once wrote this (slow) code to display
part of a mandelbrot fractal:

    load'viewmat'
    viewmat+/2&>:|((j.~/~(%~i:)99)&+@:*:)^:(i.32)0

It'll likely require you more typing in python, but then you'd need to do such
things quite a lot for seeing an amortization in terms of less time spent with
your PC; I think most people will find they need a seizable learning
investment to get anywhere with J and python already is very expressive for
the kind of things J is good at.

'as




More information about the Python-list mailing list