rdlatimer | 1 Jan 2005 23:20
Favicon

Graphics in XP

I'm using OcamlWin.exe

How do I use the Graphics modules?

Here's my error message:

# Graphics.open_graph "";;
Reference to undefined global `Graphics'

Thanks,
 Randy Latimer rdlatimer <at> tjhsst.edu

_______________________________________________
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

Jonathan Roewen | 2 Jan 2005 00:04
Picon

Garbage Collecting

Hi,

We're trying to figure out why memory doesn't get collected in our OS
by the OCaml GC, and seems like it doesn't want to reclaim any memory.
We also suspect that Gc.allocated_bytes has a memory leak.

Here is our test case:
(* File mod.ml -- some ``useful'' Caml functions *)
open Printf

let fib (n:int) =1 + n

;;

let mem = ref 0;;
let do_stuff () = 
(* 	making this loop more increases mem usage *)
	for i=1 to 900000 do
		fib i;
		int_of_float (Gc.allocated_bytes()); (* A *)
	done;
	mem := int_of_float (Gc.allocated_bytes())
;;

let do_results() = 
	printf "allocated %d\n" !mem;
	Gc.full_major(); (* B1 *)
	Gc.compact();
	Gc.major();
	Gc.minor(); (*B2 *)
(Continue reading)

Christophe TROESTLER | 2 Jan 2005 00:23
Picon

Re: Graphics in XP

On Sat, 1 Jan 2005, rdlatimer <at> tjhsst.edu wrote:
> 
> # Graphics.open_graph "";;
> Reference to undefined global `Graphics'

Type

 #load "graphics.cma";;

first (the prompt '#' is NOT displayed above).  For further "beginner
questions", please use http://groups.yahoo.com/group/ocaml_beginners

Happy new year,
ChriS

_______________________________________________
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

Jonathan Roewen | 2 Jan 2005 00:48
Picon

Re: Garbage Collecting

Okay, so we didn't look at the documentation properly.
Gc.allocated_bytes is for lifetime of the program. Now things suddenly
make a whole lot of sense =)

_______________________________________________
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

Daniel Bünzli | 2 Jan 2005 00:44
Picon
Picon
Favicon

Re: Wither us -pack lacking users?

Objcopy used to be distributed with macosx's developer tools but they  
were broken. I think they were removed in the latest public  
distribution of the developer tools.

Your problem is a known wish :

<http://caml.inria.fr/bin/caml-bugs/feature%20wish?id=2634;user=guest; 
selectid=2634>

Regards,

Daniel

_______________________________________________
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

Olivier Andrieu | 2 Jan 2005 00:59
Picon

Re: Garbage Collecting

 > Jonathan Roewen [Sun, 2 Jan 2005]:
 > 
 > Hi,
 > 
 > We're trying to figure out why memory doesn't get collected in our
 > OS by the OCaml GC, and seems like it doesn't want to reclaim any
 > memory.  We also suspect that Gc.allocated_bytes has a memory leak.
 > 
 > Here is our test case:
 > (* File mod.ml -- some ``useful'' Caml functions *)
 > open Printf
 > 
 > let fib (n:int) =1 + n
 > 
 > ;;
 > 
 > let mem = ref 0;;
 > let do_stuff () = 
 > (* 	making this loop more increases mem usage *)
 > 	for i=1 to 900000 do
 > 		fib i;
 > 		int_of_float (Gc.allocated_bytes()); (* A *)
 > 	done;
 > 	mem := int_of_float (Gc.allocated_bytes())
 > ;;
 > 
 > let do_results() = 
 > 	printf "allocated %d\n" !mem;
 > 	Gc.full_major(); (* B1 *)
 > 	Gc.compact();
(Continue reading)

Jacques Garrigue | 2 Jan 2005 02:21
Picon

Re: Wishes for an easy install of Ocaml

From: Richard Jones <rich <at> furbychan.annexia.org>
> On Mon, Dec 27, 2004 at 05:54:11PM +0100, Sven Luther wrote:
> > What about installing tuareg by default in the ocaml-core or whatever
> > meta-package, and have it ask a debconf question at priority medium about
> > which of the two emacs bindings should be used ? 
> 
> What about ditching the core emacs support and just including tuareg
> mode instead, since (no offence to whoever wrote the core support)
> tuareg's much better.

The core ocaml-mode has been written by so many people, that nobody
will take the blame (I hope so, or you could face a vendetta.)
The problem with it is that the code is such spagetthi that it gets
difficult to improve it (at least the indentation part.)

Having never tried Tuareg (mostly out of inertia, since I'm satisfied
with the core mode), could you be more precise about what is better in
Tuareg. Excluding indentation style of course, as this is a matter of
taste. (But note that in order to replace the core mode, you have to be
able to indent in exactly the same way.)

Just curious.

Ditching the core mode would indeed save time for some people.

Cheers for the new year.

       Jacques Garrigue

_______________________________________________
(Continue reading)

Jacques Garrigue | 2 Jan 2005 02:35
Picon

Re: MacOS port and file formats

From: Mary Fernandez <mff <at> research.att.com>

> Thanks for your message.  Here is what I am trying to do.
> 
> My O'Caml application is an XQuery engine.  It has three
> APIs: one for O'Caml, one for C, and one for Java applications.
> 
> We create a native-code, dynamically linked
> C library that includes our O'Caml library, the O'Caml runtime,
> and several other C libraries that our application depends upon
> the unix, nums, str libraries plus an external PCRE library.
> We actually do this by hand with ocamlopt (not ocamlmklib)
> because in the past, we found ocamlmklib did not work consistently
> on all platforms.

To be more precise, ocamlmklib produces two kinds of output: a DLL for
dynamic loading in bytecode programs, and a static library for custom
and native programs.
What you seem to want is a dynamic library to link with native
programs, which is out of the specification.

On most architectures, the DLL can be used as a dynamic library, but
this is not true on darwin, and only partly true on windows (you also
need a binding library, which is not kept.)

If your concern is darwin, then there is a simple answer: you can just
get the installed static library, and turn it into a dynamic library,
as all C code on darwin is position independent. Just look for the
correct linker incantation in the darwin manual.
It's better not to try to meddle with the core ocaml compilation,
(Continue reading)

Don Syme | 2 Jan 2005 05:07
Picon
Favicon

Internships and Post-doctoral Positions at MSR Cambridge

 

Dear Caml-list,

 

On behalf of those at Microsoft Research, Cambridge, I would like to announce that applications for intern positions at our lab for 2005 are now being accepted.  Our lab has a number of groups, but of particular interest may be the Distributed Systems group (http://research.microsoft.com/camdis/), the Programming Principles and Tools group (http://research.microsoft.com/ppt/) and the Security group (http://research.microsoft.com/security/)  For myself I am particularly interested in applications for projects related to type systems, virtual machines and/or aspects of language design and implementation related to .NET, ML and F# (http://research.microsoft.com/projects/fsharp).  Specific interests of other researchers are detailed on their home pages, and in general you should consider discussing potential projects with a specific researcher soon after applying.

 

Cambridge is a great place to work, and Internships normally last 12 weeks and most commonly occur over the summer. Applicants should be graduate students on PhD programs.

 

For summer 2005 Internships, the deadline for complete applications is 28th February 2005, and references have to be received by this date. The admission process is quite competitive, and we encourage applications in good time before the deadline. We aim to notify candidates of the outcome of their applications by the end of April 2005.

 

Full details and application forms can be found at the following link:

 

http://research.microsoft.com/aboutmsr/jobs/internships/cambridge.aspx

 

In addition, we are always open to applications for a smaller number of post-doctoral positions.  Full details can be found at

 

http://research.microsoft.com/aboutmsr/jobs/cambridgepostdoc.aspx

 

Don Syme

MSR Cambridge http://research.microsoft.com/aboutmsr/labs/cambridge/default.aspx

 

 

Richard Jones | 2 Jan 2005 11:50

Re: Wishes for an easy install of Ocaml

On Sun, Jan 02, 2005 at 10:21:49AM +0900, Jacques Garrigue wrote:
> The core ocaml-mode has been written by so many people, that nobody
> will take the blame (I hope so, or you could face a vendetta.)
> The problem with it is that the code is such spagetthi that it gets
> difficult to improve it (at least the indentation part.)
> 
> Having never tried Tuareg (mostly out of inertia, since I'm satisfied
> with the core mode), could you be more precise about what is better in
> Tuareg. Excluding indentation style of course, as this is a matter of
> taste. (But note that in order to replace the core mode, you have to be
> able to indent in exactly the same way.)

I don't know about the exact details, but I notice the difference when
I have to use a machine which doesn't have tuareg-mode installed.  So
much so that I just install tuareg before going any further.
Integration with font-lock-mode seems better.

I'm quite sure that tuareg-mode can be configured to indent
the same way as the core mode.

Since tuareg-mode is actually developed at INRIA, it would seem fairly
logical to integrate it into OCaml.

Rich.

--

-- 

_______________________________________________
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


Gmane