Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] Reading a large text file
@ 2004-04-28 15:28 André Luiz Moura
  2004-04-28 16:28 ` Richard Jones
  2004-05-01 14:03 ` Brian Hurt
  0 siblings, 2 replies; 27+ messages in thread
From: André Luiz Moura @ 2004-04-28 15:28 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 648 bytes --]

Hi List, 
 
I wrote an OCaml function to read a text file with a million of lines with  five separate columns for spaces. I based myself on previous messages of Caml-list, but however the work is taking time frightful (many minutes). 
This function written in C, for example, does not take more than 4 seconds. 
 
I am executing the program in a PC Pentium III of 128 MB of RAM under Windows platform. How would be implemented the function to decide this problem?

File format:
<vertex #> <x> <y> [attributes] [boundary marker] 

Thanks, 

André






---------------------------------
Yahoo! Messenger - Fale com seus amigos online. Instale agora!

[-- Attachment #2: Type: text/html, Size: 974 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread
* Private types
@ 2008-10-30 20:18 David Allsopp
  2008-10-30 20:33 ` [Caml-list] " Daniel Bünzli
  2008-10-30 21:47 ` Jérémie Dimino
  0 siblings, 2 replies; 27+ messages in thread
From: David Allsopp @ 2008-10-30 20:18 UTC (permalink / raw)
  To: OCaml List

I'm trying to play with the new private type abbreviations in OCaml
3.11+beta1

If I write:

module type S =
sig
  type t = private int
  val create : int -> t
end;;

module M : S =
struct
  type t = int
  let create x = x
end;;

let x = M.create 0;;

Shouldn't I now be able to say:

string_of_int x;;

But I get a type error... I'm struggling to see what difference the private
declaration has made, therefore.

I thought that the point of private types was that you could deconstruct
them... so values of type M.t are valid wherever an int is used but not the
converse.

Or have I missed something? <prepares to be embarrassed...>


David


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

end of thread, other threads:[~2008-11-02 14:53 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-28 15:28 [Caml-list] Reading a large text file André Luiz Moura
2004-04-28 16:28 ` Richard Jones
2004-05-01 14:03 ` Brian Hurt
2004-05-01 15:43   ` Rahul Siddharthan
2004-05-01 16:00     ` [Caml-list] [OcamlDoc] langage support sejourne kevin
2004-05-14  7:15       ` Maxence Guesdon
2004-05-01 18:05     ` [Caml-list] Reading a large text file Richard Jones
2004-05-01 18:25       ` Charles Forsyth
2004-05-01 19:25       ` skaller
2004-05-01 19:51         ` Alain.Frisch
2004-05-01 20:40           ` skaller
2004-05-01 21:11             ` [Caml-list] Private types skaller
2004-05-01 21:33             ` [Caml-list] Reading a large text file Alain.Frisch
2004-05-17  5:28   ` Eric Stokes
2008-10-30 20:18 Private types David Allsopp
2008-10-30 20:33 ` [Caml-list] " Daniel Bünzli
2008-10-30 21:54   ` David Allsopp
2008-10-31  0:08     ` Jacques Garrigue
2008-10-31 14:05       ` Dario Teixeira
2008-11-01  9:52         ` Jacques Garrigue
2008-11-01  1:52       ` Edgar Friendly
2008-11-01  8:19         ` David Allsopp
2008-11-01 19:31           ` Edgar Friendly
2008-11-01 20:18             ` David Allsopp
2008-11-02 14:53               ` Edgar Friendly
2008-11-01 10:00         ` Jacques Garrigue
2008-11-01 19:41           ` Edgar Friendly
2008-10-30 21:47 ` Jérémie Dimino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox