caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [ANN] OCaml-Java project : beta version
@ 2008-03-01 11:46 forum
  2008-03-01 19:03 ` [Caml-list] " Adrien
  2008-03-01 22:51 ` Richard Jones
  0 siblings, 2 replies; 12+ messages in thread
From: forum @ 2008-03-01 11:46 UTC (permalink / raw)
  To: caml-list

This post announces the beta release of the OCaml-Java project.
The goal of the OCaml-Java project is to allow seamless integration of  
OCaml and Java.
Home page: http://ocamljava.x9c.fr

This version features a new binary distribution that is packed with  
all you need to run
OCaml programs on a JVM. This distribution does not even need the  
standard Objective
Caml distribution to be installed on your computer.
URL: http://ocamljava.x9c.fr/downloads.html


All the subprojects of OCaml-Java have of course been updated.
A detailed changelog from the initial alpha release to the new beta  
release follows.

Barista subproject:
   - minor API changes
   - minor grammar changes
   - Java API

Cadmium subproject:
   - scripting support
   - XML support
   - file hooks / embedded mode
   - toplevel enhancements
   - fr.x9c.cadmium.support.values for easy encoding of OCaml values
   - SPI support

Cafesterol subproject:
   - scripting support
   - standalone linking mode
   - servlet support

Nickel subproject:
   - support for 'meta' tags

OCamlScripting subproject:
   - standalone version


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-01 11:46 [ANN] OCaml-Java project : beta version forum
@ 2008-03-01 19:03 ` Adrien
  2008-03-01 20:01   ` Adrien
  2008-03-02 10:46   ` forum
  2008-03-01 22:51 ` Richard Jones
  1 sibling, 2 replies; 12+ messages in thread
From: Adrien @ 2008-03-01 19:03 UTC (permalink / raw)
  To: forum; +Cc: caml-list

Hi,

I am running under Vista right now (this is unusual for me). This
computer does not have ocaml installed, nor cygwin, mingw, msys or
msvc. The only related program it has is java 1.6. However the same
happens under winXP.

In a command prompt if I run "javaw ocaml.jar", I get a graphical
message box telling me :
  Java Virtual Machine Launcher
  ---------------------------
  Could not find the main class. Program will exit.

If I rather run "java ocaml.jar", the error message is:
  Exception in thread "main" java.lang.NoClassDefFoundError: ocaml/jar


I've seen in your roadmap you have to port it to java 1.6. Does it
mean that meanwhile it is absolutely impossible to run ocamljava with
java6 ?

Thanks.


PS : by the way, your ocaml repl works really nicely ; I've used it
under internet explorer, k-meleon, opera, firefox, xp or vista (only
k-meleon and ie then) but not linux as I usually don't have the jvm.
It has been useful several times. Thanks. :)

 ---

Adrien Nader


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-01 19:03 ` [Caml-list] " Adrien
@ 2008-03-01 20:01   ` Adrien
  2008-03-02 10:53     ` forum
  2008-03-02 10:46   ` forum
  1 sibling, 1 reply; 12+ messages in thread
From: Adrien @ 2008-03-01 20:01 UTC (permalink / raw)
  To: caml-list

David Allsopp just pointed to me my command-line was incorrect. It
lacked the -jar switch :
  java -jar ocaml.jar

Thanks a lot !


However one has to note it is not possible to use javaw : it returns
immediately and here immediately really means immediately, faster than
a java program can start.

Now about ocamljava, ocaml.jar immediately exits with "unable to
locate ocaml toplevel". I thought it did not need ocaml(.out).

Also, ocamljava.jar has another problem :
  java -jar bin\ocamljava.jar
  Fatal error: exception
Sys_error("/usr/local/share/camomile/database/general_cat
  egory.mar: java.io.IOException: file does not exist:
.\usr\local\share\camomile\
  database\general_category.mar")


Thanks for your work.

 ---

Adrien Nader


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-01 11:46 [ANN] OCaml-Java project : beta version forum
  2008-03-01 19:03 ` [Caml-list] " Adrien
@ 2008-03-01 22:51 ` Richard Jones
  2008-03-02 10:52   ` forum
  1 sibling, 1 reply; 12+ messages in thread
From: Richard Jones @ 2008-03-01 22:51 UTC (permalink / raw)
  To: caml-list

I should add that there's a Fedora tracking bug for ocamljava where
(if you have Fedora or Red Hat Enterprise Linux) you can play with the
previous alpha version:

  https://bugzilla.redhat.com/show_bug.cgi?id=434560

I was working on the beta version today but didn't quite get it going.
When I do it'll appear in the above tracking bug.

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-01 19:03 ` [Caml-list] " Adrien
  2008-03-01 20:01   ` Adrien
@ 2008-03-02 10:46   ` forum
  2008-03-02 20:38     ` Florian Weimer
  1 sibling, 1 reply; 12+ messages in thread
From: forum @ 2008-03-02 10:46 UTC (permalink / raw)
  To: caml-list


Le 1 mars 08 à 20:03, Adrien a écrit :

> Hi,
>
> I am running under Vista right now (this is unusual for me). This
> computer does not have ocaml installed, nor cygwin, mingw, msys or
> msvc. The only related program it has is java 1.6. However the same
> happens under winXP.
>
> In a command prompt if I run "javaw ocaml.jar", I get a graphical
> message box telling me :
>  Java Virtual Machine Launcher
>  ---------------------------
>  Could not find the main class. Program will exit.
>
> If I rather run "java ocaml.jar", the error message is:
>  Exception in thread "main" java.lang.NoClassDefFoundError: ocaml/jar

You should rather run "java -jar ocaml.jar".
I was not aware of the existence of a "javaw" utility; it is a Windows- 
only thing ?


> I've seen in your roadmap you have to port it to java 1.6. Does it
> mean that meanwhile it is absolutely impossible to run ocamljava with
> java6 ?

No, ocamljava should run on any 1.5+ JVM provided that:
	- JVMs remains backward compatible (this should be the case, as a Sun  
policy)
	- there is no ocamljava-related bug that show up only on later JVMs

The roadmap mentions a move from Java 1.5 to Java 1.6; it will induce  
producing
Java 1.6 bytecode and giving up 1.5 compatibility. This should  
hopefully make
ocamljava a little faster, notably at startup where 1.6-introduced  
stack frames should
have some impact.


> PS : by the way, your ocaml repl works really nicely ; I've used it
> under internet explorer, k-meleon, opera, firefox, xp or vista (only
> k-meleon and ie then) but not linux as I usually don't have the jvm.
> It has been useful several times. Thanks. :)

Thanks for the testing.
I did not mention it in my previous post but the beta update features  
some
toplevel enhancements such as the access to session history, as well  
as the
ability to save this history to a file.


Xavier Clerc

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-01 22:51 ` Richard Jones
@ 2008-03-02 10:52   ` forum
  2008-03-02 12:26     ` Richard Jones
  0 siblings, 1 reply; 12+ messages in thread
From: forum @ 2008-03-02 10:52 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list


Le 1 mars 08 à 23:51, Richard Jones a écrit :

> I should add that there's a Fedora tracking bug for ocamljava where
> (if you have Fedora or Red Hat Enterprise Linux) you can play with the
> previous alpha version:
>
>  https://bugzilla.redhat.com/show_bug.cgi?id=434560
>
> I was working on the beta version today but didn't quite get it going.
> When I do it'll appear in the above tracking bug.

A public thank to Richard for this piece of work.
I will try to assist him in the move to beta, and make ocamljava as
easy to package as possible.

By the way, could anyone point some resources/tutorials about
Fedora packaging. I am a regular <Unix/Linux> shell user but,
my machine of choice being MacOS-based, I have no experience
in creating (or even using) packages.
Thanks for any pointer.


Xavier Clerc

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-01 20:01   ` Adrien
@ 2008-03-02 10:53     ` forum
  2008-03-07 15:51       ` forum
  0 siblings, 1 reply; 12+ messages in thread
From: forum @ 2008-03-02 10:53 UTC (permalink / raw)
  To: caml-list


Le 1 mars 08 à 21:01, Adrien a écrit :
>
> Now about ocamljava, ocaml.jar immediately exits with "unable to
> locate ocaml toplevel". I thought it did not need ocaml(.out).
>
> Also, ocamljava.jar has another problem :
>  java -jar bin\ocamljava.jar
>  Fatal error: exception
> Sys_error("/usr/local/share/camomile/database/general_cat
>  egory.mar: java.io.IOException: file does not exist:
> .\usr\local\share\camomile\
>  database\general_category.mar")

Well, I have to admit that I made some errors while crafting the  
binary package.
I just fixed them and uploaded a new version (check out http://ocamljava.x9c.fr/downloads.html) 
.
You should now be able to use the various tools. Here is a short test  
session assuming you
have a "source.ml" file (typical content: <<let () = List.iter  
print_endline ["hello ..."; "... world"]>>):

Execution of toplevel:
	java -jar ocaml.jar

Compilation to OCaml bytecode:
	java -jar ocamlc.jar -o bc source.ml
Execution of produced btyecode:
	java -jar ocamlrun.jar bc

Compilation to Java jar file:
	java -jar ocamljava.jar -standalone -o prog.jar source.ml
Execution of produced jar file:
	java -jar prog.jar


However, I noticed a bug with the binary package that does not show up  
if you have
the standard OCaml distribution installed on your computer: the  
ocamlc.jar/ocamljava.jar
compilers will fail if the current directory contains the by-product  
of a previous compilation
(e.g. cmo or cmi files). The temporary workaround is to delete these  
files before any
compilation.

I suspect this bug has something to do with the embedded mode (the  
ability for the
Java-run programs to look for files inside their jar files rather than  
on the local file
system). I will hunt this bug and report to the list when it is fixed.
Sorry for the inconvenience in the meanwhile.


Xavier Clerc

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-02 10:52   ` forum
@ 2008-03-02 12:26     ` Richard Jones
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Jones @ 2008-03-02 12:26 UTC (permalink / raw)
  To: forum; +Cc: caml-list

On Sun, Mar 02, 2008 at 11:52:18AM +0100, forum@x9c.fr wrote:
> By the way, could anyone point some resources/tutorials about
> Fedora packaging. I am a regular <Unix/Linux> shell user but,
> my machine of choice being MacOS-based, I have no experience
> in creating (or even using) packages.

You'll want to start with an introduction to RPM:

http://wiki.rpm.org/Docs
http://docs.fedoraproject.org/drafts/rpm-guide-en/

This walks you through building one:

http://fedoraproject.org/wiki/Docs/Drafts/BuildingPackagesGuide

Fedora has specific guidelines:

http://fedoraproject.org/wiki/Packaging/Guidelines
http://fedoraproject.org/wiki/Packaging/OCaml

In the interests of fair 'n' balanced reporting, here are the
equivalent Debian docs:

http://www.debian.org/doc/FAQ/ch-pkgtools.en.html
http://www.debian.org/doc/debian-policy/
http://pkg-ocaml-maint.alioth.debian.org/
http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.html/index.html

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-02 10:46   ` forum
@ 2008-03-02 20:38     ` Florian Weimer
  0 siblings, 0 replies; 12+ messages in thread
From: Florian Weimer @ 2008-03-02 20:38 UTC (permalink / raw)
  To: forum; +Cc: caml-list

> I was not aware of the existence of a "javaw" utility; it is a
> Windows- only thing ?

Yes, it suppresses the creation of a console window.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-02 10:53     ` forum
@ 2008-03-07 15:51       ` forum
  2008-03-22 18:38         ` Adrien
  0 siblings, 1 reply; 12+ messages in thread
From: forum @ 2008-03-07 15:51 UTC (permalink / raw)
  To: caml-list


Le 2 mars 08 à 11:53, forum@x9c.fr a écrit :
>
>
> However, I noticed a bug with the binary package that does not show  
> up if you have
> the standard OCaml distribution installed on your computer: the  
> ocamlc.jar/ocamljava.jar
> compilers will fail if the current directory contains the by-product  
> of a previous compilation
> (e.g. cmo or cmi files). The temporary workaround is to delete these  
> files before any
> compilation.
>
> I suspect this bug has something to do with the embedded mode (the  
> ability for the
> Java-run programs to look for files inside their jar files rather  
> than on the local file
> system). I will hunt this bug and report to the list when it is fixed.
> Sorry for the inconvenience in the meanwhile.

This bug, as well as some other ones, have been fixed in the newly  
updated version.
To keep in touch with updates, one can refer to the RSS feed:
	feed://ocamljava.x9c.fr/rss.xml


Xavier Clerc

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-07 15:51       ` forum
@ 2008-03-22 18:38         ` Adrien
  2008-03-24 21:24           ` forum
  0 siblings, 1 reply; 12+ messages in thread
From: Adrien @ 2008-03-22 18:38 UTC (permalink / raw)
  To: forum; +Cc: caml-list

Hi,

I wanted to report a small (display) bug.
I'm using ocamljava often for different purposes and among them,
calculator. I had just calculated something and wanted to check my
results I launched ocamljava's toplevel.
I had some rather weird results. For instance:
# 1000.**10.;;
- : float = 1.00000000000000000e+3

...


I think this is just a matter of display. Take a look at the following example :
# 8.**35.;;
- : float = 4.05648192073033400e+31
# 8.**34.;;
- : float = 5.07060240091291760e+3
# 8.**33.;;
- : float = 6.33825300114114700e+29

It seems the last '0' is not displayed.


PS : Vista SP1, JRE 1.6.0_03-b05, Core2Duo and same on XP SP2, JRE 1.6, P4


 ---

Adrien Nader


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Caml-list] [ANN] OCaml-Java project : beta version
  2008-03-22 18:38         ` Adrien
@ 2008-03-24 21:24           ` forum
  0 siblings, 0 replies; 12+ messages in thread
From: forum @ 2008-03-24 21:24 UTC (permalink / raw)
  To: caml-list


Le 22 mars 08 à 19:38, Adrien a écrit :
> Hi,
>
> I wanted to report a small (display) bug.
> I'm using ocamljava often for different purposes and among them,
> calculator. I had just calculated something and wanted to check my
> results I launched ocamljava's toplevel.
> I had some rather weird results. For instance:
> # 1000.**10.;;
> - : float = 1.00000000000000000e+3
>
> ...
>
>
> I think this is just a matter of display. Take a look at the  
> following example :
> # 8.**35.;;
> - : float = 4.05648192073033400e+31
> # 8.**34.;;
> - : float = 5.07060240091291760e+3
> # 8.**33.;;
> - : float = 6.33825300114114700e+29
>
> It seems the last '0' is not displayed.

This is indeed a very embarassing bug in the float to string conversion.
It is now fixed in the darcs repository (of the Cadmium subproject).
The upcoming binary revision will of course also feature this fix.
Thanks for reporting this bug.


Xavier Clerc

PS: bugs can also be reported at http://bugs.x9c.fr/



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-03-24 21:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-01 11:46 [ANN] OCaml-Java project : beta version forum
2008-03-01 19:03 ` [Caml-list] " Adrien
2008-03-01 20:01   ` Adrien
2008-03-02 10:53     ` forum
2008-03-07 15:51       ` forum
2008-03-22 18:38         ` Adrien
2008-03-24 21:24           ` forum
2008-03-02 10:46   ` forum
2008-03-02 20:38     ` Florian Weimer
2008-03-01 22:51 ` Richard Jones
2008-03-02 10:52   ` forum
2008-03-02 12:26     ` Richard Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).