[Caml-list] Re: Unicode, update

2010-10-18 Thread Paul Steckler
Sylvain Le Gall wrote: > Would it be possible to publish them as an external library? What I did isn't really complete enough to constitute a library, I'd say. Here's what I did: >From Pervasives: open_out_win32 open_out_bin_win32 open_out_gen_win32 open_in_win32 open_in_bin_win32

[Caml-list] Unicode, update

2010-10-14 Thread Paul Steckler
A couple of weeks ago or so, I asked about using OCaml file primitives with the Camomile library for Unicode on Windows. I thought I'd update people on the list about my resolution of these issues. I decided to make the application UTF-8 throughout, so that the string type always means UTF-8 -- O

Re: [Caml-list] Windows filenames and Unicode

2010-09-29 Thread Paul Steckler
On Wed, Sep 29, 2010 at 4:23 PM, David Allsopp wrote: > A way (but not foolproof on Windows 7 and Windows 2008 R2 because you can > disable it) would be to wrap the GetShortPathName Windows API function[1] > which will convert the pathname to its DOS 8.3 format which will not contain > Unicode

[Caml-list] Windows filenames and Unicode

2010-09-28 Thread Paul Steckler
In Windows, NTFS filenames are specified in Unicode (UTF-16). Am I right in thinking that OCaml file primitives, like open_in, readdir, etc. cannot handle NTFS filenames containing characters with codepoints greater than 255? I'm aware of the Camomile library, which gives the ability to manipulat

[Caml-list] Segfault with humongous heap size

2010-09-02 Thread Paul Steckler
If I enter this in my shell: declare -x OCAMLRUNPARAM="h=32" every OCaml program I run yields a segfault. I have OCaml 3.11.1+rc1 installed on Fedora 12 x64. Of course, that heap size, 3.2G words, is larger than the memory I have installed, but still, I shouldn't get a segfault. -- P

[Caml-list] Re: Segfaults with Dynlink with OCaml 3.11

2010-08-24 Thread Paul Steckler
On Mon, Aug 23, 2010 at 8:57 PM, Paul Steckler wrote: > I'm getting segmentation faults when using dynamically linked native > code in 64-bit OCaml 3.11 running on Linux (Fedora 12 x64). Many thanks to all who gave useful advice on tracking down this problem. We have three chunk

[Caml-list] Dynlink native library for ocaml-mingw32

2010-08-24 Thread Paul Steckler
I have a Fedora 11 instance where I've installed mingw32-ocaml-3.11.0-0.16.beta1.fc11.noarch to create Windows executables. I've mentioned issues with the native-code threading libraries in that distribution before on this list. Recently, I added calls into the dynlink library in my code (see my

Re: [Caml-list] Segfaults with Dynlink with OCaml 3.11

2010-08-23 Thread Paul Steckler
On Mon, Aug 23, 2010 at 10:05 PM, Mark Shinwell wrote: > It can be a time-consuming task, but double-check all the rules on > http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html are being followed. > For example, watch out for things like variables of type [value] that are > wrongly not prot

Re: [Caml-list] Segfaults with Dynlink with OCaml 3.11

2010-08-23 Thread Paul Steckler
On Mon, Aug 23, 2010 at 9:06 PM, Stéphane Glondu wrote: > Does your real large program use C bindings? Are you able to reproduce > the segfaults with pure OCaml code? Yes, the large program has C bindings, including calls into dynamically loaded .so files (Linux dynamic libraries). Anything I sh

[Caml-list] Segfaults with Dynlink with OCaml 3.11

2010-08-23 Thread Paul Steckler
I'm getting segmentation faults when using dynamically linked native code in 64-bit OCaml 3.11 running on Linux (Fedora 12 x64). The .cmxs file loads fine. There's a glue module that's "open"d in the code for the dynamic module, and linked against the main program. The dynamic module calls funct

Fwd: [Caml-list] More re GC hanging

2010-08-15 Thread Paul Steckler
On Sun, Aug 15, 2010 at 7:16 PM, Basile Starynkevitch wrote: > To check that it did work as expected (which I doubt) do >   cat /proc/sys/kernel/randomize_va_space > it should give 0 It did work as expected. > Are you sure that you don't have badly coded C routines that you call > from your Ocam

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Paul Steckler
> I guess this is related to the fact that recent Linux kernel have turned > on the randomize virtual address space feature -designed to improve > system security. You could disable it by >  echo 0 > /proc/sys/kernel/randomize_va_space > but first learn more about it. For some reason, I was able t

Re: [Caml-list] More re GC hanging

2010-08-15 Thread Paul Steckler
On Sun, Aug 15, 2010 at 5:03 PM, Basile Starynkevitch wrote: > I guess this is related to the fact that recent Linux kernel have turned > on the randomize virtual address space feature -designed to improve > system security. You could disable it by >  echo 0 > /proc/sys/kernel/randomize_va_space >

[Caml-list] More re GC hanging

2010-08-14 Thread Paul Steckler
I haven't yet come up with a solution to the GC hanging problem I mentioned the other day. But here's something that looks funny. I changed the default minor heap size, the major heap increment, the allocation policy. I also threw in a `Gc.major_slice 0' in the code. After turning on the Gc verb

[Caml-list] GC hangs application

2010-08-11 Thread Paul Steckler
, the code went farther. Are there known issues with the OCaml gc? I'm using OCaml 3.11 on Fedora 12. -- Paul -- Paul Steckler National ICT Australia paul DOT steckler AT nicta.com.au The information in this e-mail may be confidential and subject to legal professional privilege and/or copy

[Caml-list] Re: Unix.send blocks

2010-06-16 Thread Paul Steckler
ldn't have helped in this situation, anyway, because the blocking status of the socket wasn't the issue. -- Paul -- Paul Steckler National ICT Australia paul DOT steckler AT nicta.com.au The information in this e-mail may be confidential and subject to legal professional privilege and/o

[Caml-list] Unix.send blocks

2010-06-16 Thread Paul Steckler
send buffer is pretty large (64k), and the data to be sent is always much less than that. While it's easy to reproduce the error (a certain pattern of requests from the browser), I can't tell what particular conditions cause the blocking behavior. Any help appreciated. -- Paul -- P

[Caml-list] Multi-threaded programs using MinGW x-compiler

2010-05-23 Thread Paul Steckler
library that's distributed with the Windows version of OCaml. That library would have to be converted, somehow, from the .lib format to the .a format. -- Paul -- Paul Steckler National ICT Australia paul DOT steckler AT nicta.com.au The information in this e-mail may be confidential

RE: [Caml-list] 8-bit characters on command line

2010-05-16 Thread Paul Steckler
> From: Dmitry Bely [dmitry.b...@gmail.com] > Just tested with MSVC 9.0 - exactly the same problem. Yes, MSVC 10.0 has the same issue -- though gcc 4.3 installed via Cygwin does not. -- Paul The information in this e-mail may be confidential and subject to legal professional privilege and/or co

RE: [Caml-list] 8-bit characters on command line

2010-05-13 Thread Paul Steckler
1) 8-bit characters are read and written OK to the OCaml interpreter via the Windows console, and 2) if I write the equivalent C program and compile it on Windows, 8-bit characters are passed as arguments and spat back just fine Instead, there seems to be something in the way OCaml handles co

[Caml-list] 8-bit characters on command line

2010-05-13 Thread Paul Steckler
l, and Windows ocaml, not well -- but just the opposite holds! In Windows, if I enter a string containing an 8-bit character, the interpreter spits it back faithfully: # "é";; - : string = "é" But in Linux: # "é";; - : string = "\195\169" Why thi

[Caml-list] findlib with MinGW

2009-05-19 Thread Paul Steckler
Does anyone have clear instructions on how to build findlib with the MinGW port of OCaml? For me, the `configure' script with the option `-system mingw' fails when it tries to build tools/extract_args. I'm using the Windows 7 RC. -- Paul -- Paul Steckler National ICT Aus

[Caml-list] Limiting scope of grammar extension

2009-02-03 Thread Paul Steckler
-- Paul Steckler National ICT Australia paul DOT steckler AT nicta.com.au ___ 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.yaho

RE: [Caml-list] Ampersand in camlp4 grammar extension

2009-01-28 Thread Paul Steckler
Hi Nicolas, > However I can guess in your question that you don't really want to change the syntax of the binary operator "&", but rather to change it's meaning. In camlp4 there is a much more sane and easier way to do this using filters. By the way there is an example in the camlp4 sources that d

[Caml-list] Ampersand in camlp4 grammar extension

2009-01-28 Thread Paul Steckler
nds in my expression rewrite rules. I've tried "&" and SYMBOL "&", which don't work -- the preprocessed file contains the original ampersands. OTOH, I've written rules which use things like "->" and work fine. Any help appreciated. -- Pa

RE: [Caml-list] SSL version of Http_client?

2009-01-15 Thread Paul Steckler
Thanks, works great. -- Paul -- Paul Steckler National ICT Australia paul DOT steckler AT nicta.com.au From: caml-list-boun...@yquem.inria.fr [caml-list-boun...@yquem.inria.fr] On Behalf Of Eric Cooper [...@cmu.edu] Sent: Friday, January 16, 2009 1:34 PM

[Caml-list] SSL version of Http_client?

2009-01-15 Thread Paul Steckler
Hi, I want to write an HTTP client that uses SSL/TLS. I'm aware of the netclient library, which has an Http_client module. That would be great, except it doesn't support SSL. Is there an OCaml library that support HTTP over SSL/TLS? -- Paul -- Paul Steckler National ICT