Re: [Haskell-cafe] Haskell and Java interaction

2009-02-10 Thread Wolfgang Jeltsch
Am Montag, 9. Februar 2009 22:58 schrieb Robert Greayer:
> I'm sure this isn't the solution you are looking for, but when I had to do
> something similar (integrate an Eclipse plugin to Haskell code) the
> simplest approach I found was to simply invoke the Haskell in a separate
> process, binding the stdin/stdout of the Haskell process to Java
> output/input streams.  Perhaps low-tech, but has worked well for me.

For communication between Haskell software and Eclipse, there is also Cohatoe 
(). Interally, it works 
similar to what you described, as far as I know.

Best wishes,
Wolfgang
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java interaction

2009-02-09 Thread Robert Greayer
I'm sure this isn't the solution you are looking for, but when I had to do 
something similar (integrate an Eclipse plugin to Haskell code) the simplest 
approach I found was to simply invoke the Haskell in a separate process, 
binding the stdin/stdout of the Haskell process to Java output/input streams.  
Perhaps low-tech, but has worked well for me.




- Original Message 
From: Silviu ANDRICA 
To: "haskell-cafe@haskell.org" 
Sent: Monday, February 9, 2009 10:56:40 AM
Subject: [Haskell-cafe] Haskell and Java interaction

Hello,
I was wondering if there is a way to call Haskell code from Java. I tried using 
jvm-bridge(http://sourceforge.net/projects/jvm-bridge/), but I'm stuck on 
building it.

Thank you very much,
Silviu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



  
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java interaction

2009-02-09 Thread C.M.Brown
Hi Silviu,

There's the GCJNI:
http://www.haskell.org/gcjni/

Which is basically a greencard-ed JNI interface for Haskell. I'm not sure
it's still suported but may be worth a shot.

Regards,
Chris.


On Mon, 9 Feb 2009, Silviu ANDRICA wrote:

> Hello,
>   I was wondering if there is a way to call Haskell code from Java. I
> tried using jvm-bridge(http://sourceforge.net/projects/jvm-bridge/), but
> I'm stuck on building it.
>
> Thank you very much,
>   Silviu
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell and Java interaction

2009-02-09 Thread Silviu ANDRICA

Hello,
 I was wondering if there is a way to call Haskell code from Java. I 
tried using jvm-bridge(http://sourceforge.net/projects/jvm-bridge/), but 
I'm stuck on building it.


Thank you very much,
 Silviu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-12 Thread Neil Bartlett
+1

Due to the commercial environment I work in, there's really no chance
of me using Haskell at work unless it runs under JVM or CLR. Brian,
consider yourself nagged! And if there's anywhere you need some help,
please yell.

Neil


On Fri, Sep 12, 2008 at 8:44 AM, John Goerzen <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 10, 2008 at 05:35:20PM -0400, Brian Alliet wrote:
>> On Wed, Sep 10, 2008 at 02:12:00PM +0200, Marc Weber wrote:
>> > There used to be.
>> > http://www.cs.rit.edu/~bja8464/lambdavm/
>> > (Last darcs change log entry:
>> > Sun Oct 21 03:05:20 CEST 2007  Brian Alliet <[EMAIL PROTECTED]>
>> >   * fix build for hsjava change
>> > )
>>
>> Sorry about this. I hit a critical mass of darcs conflicts (I look
>> forward to giving git a try) around the same time I got really busy at
>> work. I've been meaning to get back into it (and update it to GHC HEAD)
>> but I haven't received sufficient nagging yet. Please yell if you're
>> interested in LambdaVM. At the very least I should be able to help get
>> whatever is in darcs compiling.
>
> I for one would welcome the ability to compile Haskell programs into
> Java bytecode.  One issue I have right now is the ability to get my
> code into the hands of a wide audience, since the Haskell toolchain is
> not widely installed by default.  That and I tend to use a ton of
> Haskell modules, and there isn't a "just install all the deps" in ghc
> yet ;-)
>
> -- John
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-12 Thread John Goerzen
On Wed, Sep 10, 2008 at 05:35:20PM -0400, Brian Alliet wrote:
> On Wed, Sep 10, 2008 at 02:12:00PM +0200, Marc Weber wrote:
> > There used to be.
> > http://www.cs.rit.edu/~bja8464/lambdavm/
> > (Last darcs change log entry:
> > Sun Oct 21 03:05:20 CEST 2007  Brian Alliet <[EMAIL PROTECTED]>
> >   * fix build for hsjava change
> > )
> 
> Sorry about this. I hit a critical mass of darcs conflicts (I look
> forward to giving git a try) around the same time I got really busy at
> work. I've been meaning to get back into it (and update it to GHC HEAD)
> but I haven't received sufficient nagging yet. Please yell if you're
> interested in LambdaVM. At the very least I should be able to help get
> whatever is in darcs compiling.

I for one would welcome the ability to compile Haskell programs into
Java bytecode.  One issue I have right now is the ability to get my
code into the hands of a wide audience, since the Haskell toolchain is
not widely installed by default.  That and I tend to use a ton of
Haskell modules, and there isn't a "just install all the deps" in ghc
yet ;-)

-- John
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-11 Thread Andrew Coppin

Marc Weber wrote:

There used to be.
http://www.cs.rit.edu/~bja8464/lambdavm/
  


My God... so it exists already?

Heh, and to think I was going to try to implement this... ;-)

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-10 Thread Brian Alliet
On Wed, Sep 10, 2008 at 02:12:00PM +0200, Marc Weber wrote:
> There used to be.
> http://www.cs.rit.edu/~bja8464/lambdavm/
> (Last darcs change log entry:
> Sun Oct 21 03:05:20 CEST 2007  Brian Alliet <[EMAIL PROTECTED]>
>   * fix build for hsjava change
> )

Sorry about this. I hit a critical mass of darcs conflicts (I look
forward to giving git a try) around the same time I got really busy at
work. I've been meaning to get back into it (and update it to GHC HEAD)
but I haven't received sufficient nagging yet. Please yell if you're
interested in LambdaVM. At the very least I should be able to help get
whatever is in darcs compiling.

-Brian
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-10 Thread Marc Weber
There used to be.
http://www.cs.rit.edu/~bja8464/lambdavm/
(Last darcs change log entry:
Sun Oct 21 03:05:20 CEST 2007  Brian Alliet <[EMAIL PROTECTED]>
  * fix build for hsjava change
)
However it didn't compile for me or I had some other problems.
The last bits from the Java backend have been removed 4 month ago.
Someone has just said: Fine, so they are finally just gone after a long
while of just laying around (or something similar)

Eclipsefp itself is nice, but It's lacking all functionality you'd
expect from an Eclipse plugin today except compiling.
(So no outline, jump to definitions etc.. :( (AFAIK))

So if you want to revive a Haskell -> JVM project you'll need to dive
into some internals and spend quite a lot time on that project I'd guess.

Sincerly
Marc Weber
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-10 Thread Janis Voigtlaender

Bulat Ziganshin wrote:

Is there a
a Haskell to Java compiler that's
already ready to use?



CAL



Just in case this answer was a bit cryptic for the original poster...

What Bulat means is the following:

http://labs.businessobjects.com/cal/

--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:[EMAIL PROTECTED]



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-09 Thread Andy Smith
2008/9/9 Maurí­cio <[EMAIL PROTECTED]>:
> I use Haskell, and my friends at
> work use Java. Do you think it
> could be a good idea to use Haskell
> with Java, so I could understand
> and cooperate with them? Is there a
> a Haskell to Java compiler that's
> already ready to use?

Besides the other approaches people have suggested, maybe you could
use a combination of the Haskell FFI and JNI (Java Native Interface)
or JNA (Java Native Access). I have no idea how practical this would
be, and it would only work on platforms where you can compile Haskell
to native code rather than on any JVM, but if that's OK it might be
worth exploring.

If you want to call Haskell functions from Java, it seems to me it
should be possible to write FFI export declarations for the Haskell
functions you want to use from Java, and write a C wrapper to package
the exported functions for JNI as if they were native C functions.
With JNA you might be able to avoid writing a C wrapper, although I
know even less about JNA than I do about JNI. It should also be
possible to go the other way if you want to call Java code from
Haskell, at least with JNI but possibly not with JNA.

Andy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-09 Thread wren ng thornton

Maurí­cio wrote:

Hi,

I use Haskell, and my friends at
work use Java. Do you think it
could be a good idea to use Haskell
with Java, so I could understand
and cooperate with them? Is there a
a Haskell to Java compiler that's
already ready to use?


Generally speaking, not really. There was a lot of work around the turn 
of the century, but all of it seems to have dried up and been replaced 
by Scala. I can give you some links on various projects, but so far as I 
know there's nothing that's still being maintained/developed so I 
wouldn't suggest any of them for work.


I don't know much about Scala, though there are a few folks on Planet 
Haskell who do. If you're looking for a Haskell-like functional language 
for the JVM, it may be for you.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-09 Thread Daryoush Mehrtash
Why do you want to mix haskall and Java in one VM?  If there are
functionality within your code that is better implemented in haskell, then
why not  make that into a service (run it as haskell) with some api that
Java code can use.

Daryoush

On Tue, Sep 9, 2008 at 2:36 AM, Maurí­cio <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I use Haskell, and my friends at
> work use Java. Do you think it
> could be a good idea to use Haskell
> with Java, so I could understand
> and cooperate with them? Is there a
> a Haskell to Java compiler that's
> already ready to use?
>
> Thanks,
> Maurício
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



-- 
Daryoush

Weblog: http://perlustration.blogspot.com/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-09 Thread Bulat Ziganshin
Hello Mauri­cio,

Tuesday, September 9, 2008, 1:36:09 PM, you wrote:

> I use Haskell, and my friends at
> work use Java. Do you think it
> could be a good idea to use Haskell
> with Java, so I could understand
> and cooperate with them?

http://haskell.org/haskellwiki/Applications_and_libraries/Interfacing_other_languages

in particular, GreenCard doesn't work with ghc >= 6.2


> Is there a
> a Haskell to Java compiler that's
> already ready to use?

CAL

-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-09 Thread Donnchadh Ó Donnabháin
It's not haskell to java compiler but you might find cohatoe and
eclipsefp interesting:

http://cohatoe.blogspot.com/
http://eclipsefp.sourceforge.net/

  Donnchadh

2008/9/9 Maurí­cio <[EMAIL PROTECTED]>:
> Hi,
>
> I use Haskell, and my friends at
> work use Java. Do you think it
> could be a good idea to use Haskell
> with Java, so I could understand
> and cooperate with them? Is there a
> a Haskell to Java compiler that's
> already ready to use?
>
> Thanks,
> Maurício
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell and Java

2008-09-09 Thread C.M.Brown
Hi,

The only thing I can think of is GCJNI:

http://www.haskell.org/gcjni/

This makes use of the FFI and a Greencarded Java JNI interface. It does
allow you to call Java programs from Haskell. However, I'm not sure if it
is still supported.

hth,
Chris.


On Tue, 9 Sep 2008, [ISO-8859-1] Maurí­cio wrote:

> Hi,
>
> I use Haskell, and my friends at
> work use Java. Do you think it
> could be a good idea to use Haskell
> with Java, so I could understand
> and cooperate with them? Is there a
> a Haskell to Java compiler that's
> already ready to use?
>
> Thanks,
> Maurício
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell and Java

2008-09-09 Thread Maurí­cio

Hi,

I use Haskell, and my friends at
work use Java. Do you think it
could be a good idea to use Haskell
with Java, so I could understand
and cooperate with them? Is there a
a Haskell to Java compiler that's
already ready to use?

Thanks,
Maurício

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe