Björn Helgason wrote:
> Is it possible to combine Python and J easily?

Yes.

The easiest way involves creating command lines in the one to
invoke the other.  If you're invoking J from Python, I'd make
a special profile for that context to use in my command line
(and parse the rest).

A more machine efficient way involves using sockets.  Set up
one of the interpreters as a server and use the other as a
client.  Again, if I were doing this, I'd make a special
profile for this context.

That said, I've never taken the time to learn python in
any depth.  I understand its advantage over perl (python
data structures rather trivially convert to string and
back, and those strings are fairly easy to use as commented
user-editable configuration files -- also the language is
simpler for some people to learn than perl), but that's
never been an important enough issue for me, personally,
to invest my time in learning it.  Therefore, I'm not
prepared to offer any deep insight into linking Python and J.

That said, I think I'd be strongly tempted to use J's 5!:5
syntax for passing data back and forth.

-- 
Raul

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to