Re: [Caml-list] Teaching ocaml programming

2008-09-27 Thread Vu Ngoc San
I agree, I use lablgl+lablgtk-gl ( I mean at the same time) on ubuntu hardy 
without problems.

San

 Use both lablgl and lablgtk (but not together) without problems.


___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Teaching ocaml programming

2008-09-27 Thread Stefano Zacchiroli
On Sat, Sep 27, 2008 at 08:08:31AM +1000, Erik de Castro Lopo wrote:
 What exactly is broken. Have you logged a bug with Ubuntu or with

I don't know as I don't use Ubuntu myself, but being a regular of the
Debian OCaml mailing list, it has happened multiple times (maybe 4 or 5,
I don't remember) that Ubuntu users complained about inconsistent
assumption errors on that list.

I don't know which was the Ubuntu release and of course I trust your
words when you say that with LTS everything is OK. I was just observing
that if in some other Ubuntu releases there are issues with OCaml stuff,
maybe they can be fixed with some pinning magics.


More generally, I've already stated in the past that we (Debian side)
are more than open towards Ubuntu developers willing to collaborate with
us for better support of OCaml in any Debian-based distro and to share
the workload (which is getting higher, as OCaml is approaching total
world domination). Sadly, nobody stepped forward to help.

If you, or anybody else, is an Ubuntu user willing to help in OCaml
package maintenance let me know, there is for sure a task for you :-)

Cheers.

-- 
Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7
[EMAIL PROTECTED],pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
I'm still an SGML person,this newfangled /\ All one has to do is hit the
XML stuff is so ... simplistic  -- Manoj \/ right keys at the right time

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] OCaml support on Ubuntu

2008-09-27 Thread David MENTRE
Hello Richard,

Context: I'm a long time Debian user, still using Debian on my
servers. But I switched my desktop machine under Ubuntu a few years ago,
seduced by the good polish and freshness of Ubuntu desktop applications.

Richard Jones [EMAIL PROTECTED] writes:

 Ubuntu's OCaml support is very flaky.  They don't have developers
 committed to it and take a random snapshot of what's in Debian.  This
 has in the past led to serious brokenness where they've taken a
 snaphot in the middle of a rebuild-the-world compiler upgrade.

I'm sorry to agree that Richard is right.

For example, I discovered at a time that *all* bytecodes shipped in Ubuntu
Gutsy could not be executed. This was fixed once spotted:
  https://bugs.launchpad.net/ubuntu/+source/ocamlnet/+bug/180364

Another example: current Hardy release (which has Long Term Support
status) is shipped which OCaml 3.10.0 which is broken regarding Camlp4. 

To fix this situation, one only needs people on the Ubuntu side to
synchronize packets from Debian at the right time.

As I have an direct interest in this story and while I have no knowledge
at all regarding Ubuntu workflow, I'll try to see what can be done.

Sincerely yours,
david
-- 
GPG/PGP key: A3AD7A2A David MENTRE [EMAIL PROTECTED]
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] OCaml support on Ubuntu

2008-09-27 Thread Erik de Castro Lopo
David MENTRE wrote:

 For example, I discovered at a time that *all* bytecodes shipped in Ubuntu
 Gutsy could not be executed. This was fixed once spotted:
   https://bugs.launchpad.net/ubuntu/+source/ocamlnet/+bug/180364
 
 Another example: current Hardy release (which has Long Term Support
 status) is shipped which OCaml 3.10.0 which is broken regarding Camlp4. 

I rarely use bytecode and and have never used Camlp4 so I haven't
been hit by these, but yes, I agree, these are serious issues.

 To fix this situation, one only needs people on the Ubuntu side to
 synchronize packets from Debian at the right time.

Agree++.

Erik
-- 
-
Erik de Castro Lopo
-
There is no satisfactory substitute for excellence.
-- Dr. Arnold O. Beckman

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Teaching ocaml programming

2008-09-27 Thread Stefano Zacchiroli
On Sat, Sep 27, 2008 at 07:33:38PM +1000, Erik de Castro Lopo wrote:
  More generally, I've already stated in the past that we (Debian side)
  are more than open towards Ubuntu developers willing to collaborate with
  us for better support of OCaml in any Debian-based distro and to share
  the workload (which is getting higher, as OCaml is approaching total
  world domination). Sadly, nobody stepped forward to help.
 
 Well I'm not an official Ubuntu developer, just someone who develops
 on Ubuntu, but I have joined the Debian Ocaml Maintainers mailing list
 and I'm even thinking of becoming an official Debian maintainer.

That's great, and thanks for your help!  However, it was not only what I
meant. Surely we, Debian-side, have a lot of work to be done and help is
always needed. Still, we need someone Ubuntu-side which coordinate with
us for their releases.

We are doing an excellent job in sharing patches with Fedora (thanks
mainly to Richard of course), it's kind of astonishing that we cannot
coordinate with Ubuntu. The main reason is of course that there is
currently no Ubuntu OCaml Maintainers group or something similar,
would you like to start organizing one?

  If you, or anybody else, is an Ubuntu user willing to help in OCaml
  package maintenance let me know, there is for sure a task for you :-)
 Sure. Whats up?

You can start looking up all the bug reports against packages maintained
by [EMAIL PROTECTED], or other individual maintainers
of OCaml-related packages. Moreover, we have several pieces of great
OCaml softwares which are not packages while they should. We also have
some infrastructure pieces missing, if you are following the mailing
list I'm sure you are aware of some of them.

Cheers.

-- 
Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7
[EMAIL PROTECTED],pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
I'm still an SGML person,this newfangled /\ All one has to do is hit the
XML stuff is so ... simplistic  -- Manoj \/ right keys at the right time

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] OCaml support on Ubuntu

2008-09-27 Thread Stefano Zacchiroli
On Sat, Sep 27, 2008 at 11:44:17AM +0200, David MENTRE wrote:
 To fix this situation, one only needs people on the Ubuntu side to
 synchronize packets from Debian at the right time.

This is enough only if you assume that Ubuntu people just want to
inherit the Debian work. Sure this will be an improvement over the
current situation, but I frankly want more.

 As I have an direct interest in this story and while I have no knowledge
 at all regarding Ubuntu workflow, I'll try to see what can be done.

The needed steps IMO are:

0) identify who among the Ubuntu developers (core developers or MOTU, I
  don't care) is willing to maintain OCaml-related stuff

1) decide upon a collaboration infrastructure and use it for *both*
  Debian and Ubuntu
  
  My proposal on this is of course to reuse Debian's, as we already have
  a version control system and a mailing list, and we have already
  reached a critical mass. By experience, other mixed Debian/Ubuntu
  maintenance teams are using the Debian infrastructure and is working
  quite well for all of the involved people

2) coordinate releases, so that the OCaml toolchain is in shape when
  either of the distribution makes a release

3) total world domination


AFAIK we are still missing step 0.

-- 
Stefano Zacchiroli -*- PhD in Computer Science \ PostDoc @ Univ. Paris 7
[EMAIL PROTECTED],pps.jussieu.fr,debian.org} -- http://upsilon.cc/zack/
I'm still an SGML person,this newfangled /\ All one has to do is hit the
XML stuff is so ... simplistic  -- Manoj \/ right keys at the right time

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


[Caml-list] embedding ocaml into a windows app: need gcc?

2008-09-27 Thread Joel Reymont
Can I do without gcc if I want to embed the OCaml compiler into a  
commercial Windows app?


Do I need to become part of the OCaml consortium to do this?

Ideally, I would like to generate OCaml code at runtime and compile it  
into something that can be loaded by a runtime of some sort.


Compiling into a DLL would be ideal, is it possible?

Are there are other options?

Thanks in advance, Joel

--
wagerlabs.com





___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] embedding ocaml into a windows app: need gcc?

2008-09-27 Thread Richard Jones
On Sat, Sep 27, 2008 at 08:27:18PM +0100, Joel Reymont wrote:
 Can I do without gcc if I want to embed the OCaml compiler into a  
 commercial Windows app?

The OCaml compiler uses gcc in various stages (linking IIRC).  Also
needs an assembler.

 Do I need to become part of the OCaml consortium to do this?

You certainly need to read the license very carefully.

However is it necessary to embed the compiler?  Can you not just call
out to the compiler as a separate process?  It's surely easier to do
Sys.command, rather than working out the licensing and technical
issues involved in linking your program to the compiler.

 Ideally, I would like to generate OCaml code at runtime and compile it  
 into something that can be loaded by a runtime of some sort.
 
 Compiling into a DLL would be ideal, is it possible?

ocamlopt -fPIC ... should be able to do it.

Or compile the code with ocamlc and use Dynlink.

Or wait for OCaml 3.11 which can use Dynlink on native code.

Rich.

-- 
Richard Jones
Red Hat

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] embedding ocaml into a windows app: need gcc?

2008-09-27 Thread David Teller
I don't know if this answers your question, but OCaml 3 now has Dynlink,
i.e. a manner of dynamically loading OCaml modules from OCaml. So if you
manage to get your code compiled at run-time, it shouldn't be too hard
to load it.

Cheers,
 David

On Sat, 2008-09-27 at 20:27 +0100, Joel Reymont wrote:
 Ideally, I would like to generate OCaml code at runtime and compile it  
 into something that can be loaded by a runtime of some sort.
 
 Compiling into a DLL would be ideal, is it possible?
 
 Are there are other options?

-- 
David Teller-Rajchenbach
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act
brings liquidations. 

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] embedding ocaml into a windows app: need gcc?

2008-09-27 Thread Mikkel Fahnøe Jørgensen
2008/9/27 Joel Reymont [EMAIL PROTECTED]:
 Can I do without gcc if I want to embed the OCaml compiler into a commercial
 Windows app?

I assume you mean native compilation.

As mentioned, you should consider using a standalone ocaml compiler to
avoid licensing issues, but either way:

The ocamlopt compiler generates assembly source code and doesn't need
a C compiler.
It needs a runtime library, a linker and an assembler.

On Windows you need to install masm - or find a compatible
alternative. (On Unix I think gcc works as assembler).

Masm can be downloaded without too much trouble - but if you start
deploying it to other users, you may have a problem. Likewise, you
must consider if your users have a linker installed and how you can
distribute it legally.

So assuming you have an assembler, ocaml compiler, linker and ocaml libraries:

If you want to attach the generated code to a live process, you need
to create a dll or a new process. If you want to attach to existing
code then start a process, you can use static linking.

So lets assume you want to create a dll.

On Windows you don't need to compile position independent code, last
time I looked, so -fPIC is not relevant.

You compile an ocaml library and link it with other code as a dll.
With the next ocaml version you might even be able to create a dll and
use it not from OCaml but from any other program. Then the problem is
solved - except for installing all the compile tools.

Without the above solution, I have created such dll's some years back.
More specifically to embed an ocamlyacc compiler in other Windows
programs.

You need to get the compile flags right, but it definitely is possible.

You can also create a COM dll if you want - and call it from .Net.
The benefit of a COM dll is that you get a clear calling interface and
can interface with .NET easily. The downside is that COM projects are
ugly.

If you create a simple dll, you need a way to manage your call backs.
I have an old ocamldll library for this purpose. It lets you register
multiple ocaml function names in a dll and call them from the
application by name.

The new windows dll solution scheduled for next OCaml version has a
more elegant solution where you don't have to register callbacks:

http://alain.frisch.fr/natdynlink.html

You can probably use this even with current OCaml version since it is
Windows specific, not OCaml specific.

Let me know if I should publish my ocamldll thing which will work, but
is not cutting edge.

All that being said:

I have considered the same thing, and it is messy because of the compiler tools.

I would like an OCaml support library that can compile and execute
similar to JaveScript engines, but we don't have that in any practical
form.

So I would recommend looking into embedding a javascript compiler
instead if performance is not absolutely critical - you could still
drive fast ocaml library routines.

In the past few months performance has exploded both in WebKit and
Mozilla. Google has also released a fast engine named V8. WebKit has
LGPL licensing issues, but Mozilla and V8 should be very embeddable.
All compilers have JIT compilation, Mozilla also 64-bit.

Or look at Haxe or Lua.

Regards,
Mikkel

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Teaching ocaml programming

2008-09-27 Thread Brighten Godfrey

On Sep 26, 2008, at 10:01 AM, Peng Zang wrote:

So, if gedit has a programmatic interface you can write
shell script to parse the compilation errors (just look for line  
numbers) and
send a command to gedit to go to the appropriate line.  I don't  
know if gedit
has that capability, but certainly there may be other text editors  
that do.


such as nedit -- see script below.


On Sep 26, 2008, at 3:09 PM, Nathaniel Gray wrote:
On Fri, Sep 26, 2008 at 5:10 AM, Brighten Godfrey  
[EMAIL PROTECTED] wrote:
I use, on a daily basis, a small script which acts as a front-end  
to `make'
and automatically points you to the error in the code in nedit,  
highlighting

the characters that the ocaml compiler complains about.  It uses the
existing nedit window if you have the file open already, or else  
opens it
for you.  The script also works with gcc instead of ocaml, and  
(though I
can't vouch for it much) gvim instead of nedit.  So my typical  
development
environment consists of nedit and a shell in which I compile via  
the script.


If anyone is interested, I'd be happy to share this.


I for one am interested -- that could come in handy!


OK, here it is:

http://www.cs.berkeley.edu/~pbg/mindy/

~Brighten

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs