Hi List, I've searched for this in OCaml lists subjects and googled without true success ( The link : http://www.okmij.org/ftp/Scheme/misc.html referred to a...
Hi, I guess we can create a enum type to include all these lists into one list. type lists = IntList of int list | CharList of char list | StringList of ...
Dear Sir/Madam, I'm a student of Univeristy of Magdeburg in Germany, and doing a Study Thesis. We confronted a problem of Binding a C-Programm into our...
Thanks a lot for your help, On Tue, 2 Sep 2008 13:21:01 +0800 ... I see : that's a way to allow polymorphism in a predefined and restricted field of types. ......
... Hash: SHA1 You do not load a "cma" file in a "ml" script. A .ml file is the source code. A .cma file is the compiled library. If you write a .ml file...
Peng Zang
peng.zang@...
Sep 2, 2008 10:55 am
10074
... Hash: SHA1 ... Generally, you'll find you rarely, if ever, need to put an int-list, a char-list and a string-list together into a larger container list....
Peng Zang
peng.zang@...
Sep 2, 2008 11:26 am
10075
Please forgive an eager newbie's constant pestering of the list while he learns the language. I have a large mess of code that is supposed to parse a text file...
On Tue, 02 Sep 2008 12:57:38 -0000 "sharifoerton" <sharifoerton@...> wrote: Hi ! ... Indeed, I do not see on this line any function able to generate such...
On Tue, 2 Sep 2008 07:26:41 -0400 ... Thanks ! ... This problem arose trying to rewrite an old C project in OCaml. Here is the code snippet to show where...
... Maybe the way you tracked down the error is wrong, you could try this method, to print a stack backtrace in case of an uncaught exception: export...
Florent Monnier
fmonnier@...
Sep 2, 2008 8:58 pm
10079
Thank you very much - I had indeed failed to locate the error correctly - I guess "printf debugging" doesn't really suffice. It ended up being a simple logic...
Greetings to all, I notice that there is no OCaml binding for wxWidgets currently available. It seems to me that writing one would benefit a (relatively) large...
... The best reference for the OCaml C FFI is the OCaml manual. Chapter 18 [1] covers the OCaml interface to C. Florent Monnier has also written an excellent...
Hi Everybody, I have some very large files that consist of many many short segments of short-integer arrays. If i load them in as integers, my computer runs...
... Well, there is (or was) this: http://plus.kaist.ac.kr/~shoh/ocaml/wxcaml/doc/ As you'll see from the date on the page, it hasn't been developed lately. In...
... I'm not familiar with the Raw module. Here are two others you could look at: Bigarray (part of the standard library) can be used directly, if the shorts...
Florent, Jon, Martin, Richard - Thanks for all the suggestions. Unfortunately, I cannot memmap the files (which are 600mb - 1.5gb) into bigarrays, as they are...
... The trick I was thinking of would be to map the files twice, firstly at a zero byte offset, and secondly at a byte offset of 1. This way, all of your...
... I don't know how efficient this would be, but one option for working with your existing files may be to use the optional pos parameter to the map_file...
Hi, I fell on a weird behavior between input channels and file descriptors. See this piece of code: let pos = Unix.lseek fd 0 Unix.SEEK_CUR in (* pos is in the...
Florent Monnier
fmonnier@...
Sep 4, 2008 10:43 pm
10090
Hi, I am a newbie to Ocaml, and need some help. I want to get the type information of a variable. If i pass a variable, say a "varinfo", I want a string with...
Hi, Rekha: I think you can use C to inspect the OCaml variables as http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora115.html. Best Regards, Cheng Wei ...
... As someone else answered, you can get information about the runtime representation of a value using low-level, unsafe hackery. But at the risk of sounding...
Eric Cooper
ecc@...
Sep 5, 2008 12:00 pm
10093
What is the best way to get the first item in a map? One could use iter or fold, but how can you avoid needlessly iterating over all elements? You can raise an...
... If you are sure that you will allways want the first item of your list, just use the function List.hd which returns its first element. Now if you sometimes...
Florent Monnier
fmonnier@...
Sep 5, 2008 6:07 pm
10095
I meant Map, should have capitalized it. Sorry for the confusion. The Map module does guarantee that iterators are traversed in order by key and so I think the...
On Fri, 5 Sep 2008 15:46:17 -0400 ... Hi Ashish ! We could ask the same question for Set or HashSet. Outside the solution you spoke about of raising an...