Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python and functional language interop

My current primary programming language is python. There are lots of things I like about it, but I also like functional languages. Not enough to do an entire program in them, but definitely for certain functionality, that fits the functional mould well.

Of course .NET is amazing in this regard, having both ironpython and F#. But considering the ironpython support for the scientific python ecosystem is still dodgy last time I checked, .NET is not much of an option for me. I am a bit shocked at the apparent lack of tools to facilitate interop between cpython and say, Haskell. They are both mature languages with large communities, that seem like such a nice match to me.

Is there something about their architecture that makes them ill-compatible that im missing, or is this just something awesome that is still waiting to happen?

To clarify; there are some half-baked projects out there, but I am thinking of something that parallels the awesomeness of Weave, pycuda, or boost. Something that automates all the plumbing inherent in interop with just a few annotations.

like image 915
Eelco Hoogendoorn Avatar asked Apr 12 '13 23:04

Eelco Hoogendoorn


1 Answers

Another approach is to use unix pipes, and just write a Haskell program, and also write a Python program, and have them communicate over text. Haskell and Python even share the same syntax for lists, so it's really easy to pipe data from one to the other.

like image 122
Theo Belaire Avatar answered Oct 03 '22 19:10

Theo Belaire