[Haskell-cafe] Summary (Re: Interfacing Java/Haskell)
Hans Georg Schaathun
georg+haskell at schaathun.net
Wed May 15 20:07:41 CEST 2013
Thank you very much to everyone who responded on java integration.
I have a lot of work to do before I can conclude, but I will give
a quick summary just in case there is some general interest.
The most common approach appears to be a network interface between
separate java and haskell processes. Both JSON and thrift appear to
tools to help doing that. That sounds like a good idea if effort is
taken properly to plan out the system architecture. In my case,
it would probably lead me to write more code in haskell than I had
originally planned (for good or for bad).
One poster pointed to neurocyte's library of JNI bindings. That's
definately something I will look into. At first sight, it looks much
easier to get into than I had feared.
The most popular proposal was, nevertheless, to use other languages,
in particular hybrid languages like scala. In my opinion, that only
solves a minor part of the problem. In my opinion, the chief virtue
of a pure language like haskell is its simplicity. Yet, I must admit,
that option was always on my list. Familiar with python, jython is
a serious option, although I would prefer strong and static type
checking.
Thanks again, everyone
:-- George
On Thu, May 09, 2013 at 11:48:09AM -0700, Dominic Espinosa wrote:
> Hello,
>
> I've had some success with the Thrift library (http://thrift.apache.org/).
> See this blog post
> (http://mortenib.wordpress.com/2009/10/29/thrift-and-haskell/) for a basic
> tutorial on getting started. My project was interfacing a haskell library
> of machine learning algorithms (which I wrote) with a large Java
> application I was familiar with but didn't write. So this may be what
> you're looking for.
>
> Thrift interfaces language X with language Y with a sort of RPC paradigm:
> you specify the names and types of the possible calls and returns, and
> Thrift uses this file to generate serialization and transport code for
> whatever languages you name. You then add this code to the project on each
> side and things pretty much just work.
>
> On Thu, May 09, 2013 at 04:04:19PM +0100, Hans Georg Schaathun wrote:
> > Hi all,
> >
> > I am rather new to the café, so I just hope my question fits in.
> >
> > Does anyone have experience with integrating Haskell and Java?
> > I have done some searching, finding a lot of pointers but hardly
> > anything in terms of evaluation, successes, or caveats.
> >
> > From what I see Frege looks promising, arguably not haskell I suppose,
> > but does it work? Other projects I have seen appear to have reached
> > a stand-still for ages.
> >
> > The background for the question is that I will contribute some control
> > algorithms based on machine learning or AI in a larger project. It
> > would save me a lot of time if I could write in Haskell, but only
> > assuming that interfacing with Java afterwards is trivial compared
> > to writing everything in java in the first place. I am, perhaps,
> > particularly worried that a Haskell-lookalike for JVM might be
> > unable to optimise properly, like not being lazy. Any advice?
> >
> > TIA
> > --
> > :-- Hans Georg
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
--
:-- Hans Georg
More information about the Haskell-Cafe
mailing list