Re: [Caml-list] Re: Logging

2010-12-21 Thread Török Edwin
On 2010-12-21 13:16, Gregory Bellier wrote: 2010/12/21 Sylvain Le Gall sylv...@le-gall.net: There is also Lwt_log. http://ocsigen.org/lwt/doc/api/Lwt_log.html To be more verbose, I have two processes with two different effective uid If both processes start out as root then you can open

Re: [Caml-list] Re: optimize div to right shift (NOT!)

2010-12-13 Thread Török Edwin
On Mon, 13 Dec 2010 12:33:33 + Jonathan Kimmitt jonat...@kimmitt.co.uk wrote: A C compiler would optimize this to a right shift. Changing that to 'Int64.shift_right n 1' speeds up the code. Sorry to be a pedant, but this is not correct. The optimisation is only possible when the

Re: Value types (Was: [Caml-list] ocamlopt LLVM support)

2010-12-12 Thread Török Edwin
On Sun, 12 Dec 2010 18:01:13 - Jon Harrop j...@ffconsultancy.com wrote: Török Edwin wrote: Do you really need to use Int64 for that though? Won't the 63-bit version do? I'm running 32-bit. That explains it, in a 32-bit chroot my modified version is still slow. I thought that 32-bit

Re: Value types (Was: [Caml-list] ocamlopt LLVM support)

2010-12-12 Thread Török Edwin
On Sun, 12 Dec 2010 20:09:00 +0100 Benedikt Meurer benedikt.meu...@googlemail.com wrote: On Dec 12, 2010, at 16:55 , Török Edwin wrote: [...] Problem #2: Int64.div n 2 - idiv instruction. A C compiler would optimize this to a right shift. Changing that to 'Int64.shift_right n 1

Re: Value types (Was: [Caml-list] ocamlopt LLVM support)

2010-12-12 Thread Török Edwin
On Sun, 12 Dec 2010 22:05:34 - Jon Harrop jonathandeanhar...@googlemail.com wrote: Edwin wrote: AFAICT LLVM's OCaml bindings are only good for generating LLVM IR from OCaml, not for actually performing transformations on it (there is no binding to retrieve the type of a value for

Re: ocamlopt LLVM support (Was: [Caml-list] OCamlJIT2 vs. OCamlJIT)

2010-12-05 Thread Török Edwin
On Sun, 5 Dec 2010 17:37:32 +0100 Benedikt Meurer benedikt.meu...@googlemail.com wrote: Two main areas for now: The GC interface and the exception handling. LLVM's exception support is really limited; the GC support is better and more generic. I don't know how to implement the OCaml exception

Re: ocamlopt LLVM support (Was: [Caml-list] OCamlJIT2 vs. OCamlJIT)

2010-12-03 Thread Török Edwin
On Fri, 3 Dec 2010 15:41:41 +0200 Eray Ozkural examach...@gmail.com wrote: Is there IPA in LLVM? I didn't know that. See createStandardLTOPasses and the UnitAtATime part of createStandardModulePasses: http://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/Support/StandardPasses.h Also

Re: [Caml-list] OCaml GC [was Is OCaml fast?]

2010-12-02 Thread Török Edwin
On Thu, 2 Dec 2010 13:57:23 +0100 Damien Doligez damien.doli...@inria.fr wrote: On 2010-11-29, at 23:27, Török Edwin wrote: This seems to be in concordance with the smaller minor heap = more minor collections = slower program observation, since it is: smaller minor heap = more minor

Re: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-11-30 Thread Török Edwin
On Tue, 30 Nov 2010 09:36:07 +0100 Benedikt Meurer benedikt.meu...@googlemail.com wrote: Hello everybody, I did some final work on OCamlJIT2, and compared the result to OCamlJIT. The performance measures are presented in the following tech report (skip straight to section 4 for the

Re: [Caml-list] OCamlJIT2 vs. OCamlJIT

2010-11-30 Thread Török Edwin
On Tue, 30 Nov 2010 18:01:28 +0100 bluestorm bluestorm.d...@gmail.com wrote: On Tue, Nov 30, 2010 at 11:55 AM, Benedikt Meurer benedikt.meu...@googlemail.com wrote: LLVM backend for ocamlopt is a totally different story. You'd have to start with the Ulambda or the Cmm intermediate

Re: [Caml-list] OCaml GC [was Is OCaml fast?]

2010-11-29 Thread Török Edwin
On Sun, 28 Nov 2010 15:29:08 +0100 Benedikt Meurer benedikt.meu...@googlemail.com wrote: Speaking of the OCaml GC in general, wouldn't it make sense to replace the current generational collector with a collector framework that requires less copying in the common case. Even without changing

Re: [Caml-list] Re: Is OCaml fast?

2010-11-23 Thread Török Edwin
On Tue, 23 Nov 2010 18:03:10 + (UTC) Isaac Gouy igo...@yahoo.com wrote: Jon Harrop jonathandeanharrop at googlemail.com writes: Note that the regex-dna solution for Haskell tweaks its GC parameters via the -H command-line parameter: Note that there is no restriction on tuning

Re: [Caml-list] Is OCaml fast?

2010-11-22 Thread Török Edwin
On Mon, 22 Nov 2010 15:36:30 +0100 bluestorm bluestorm.d...@gmail.com wrote: On Mon, Nov 22, 2010 at 3:04 PM, Gerd Stolpmann i...@gerd-stolpmann.dewrote: I think the shootout is not a good data source. There are definitely some very poor Ocaml results there, so I'd guess the shootout got

Re: [Caml-list] Is OCaml fast?

2010-11-22 Thread Török Edwin
On Mon, 22 Nov 2010 17:46:49 +0100 Fabrice Le Fessant fabr...@lefessant.net wrote: 2010/11/22 Török Edwin edwinto...@gmail.com: Isn't it possible for the GC to realise its doing too many collections and increase the minor heap size on its own? Indeed, it could notice that a lot of data

Re: [Caml-list] Causes for segfaults

2010-11-15 Thread Török Edwin
On Mon, 15 Nov 2010 18:38:18 + Jamie Brandon ja...@scattered-thoughts.net wrote: Excessive recursion of a function does raise an exception, on most platforms, doesn't it? [r...@senldogo0183 texsearch-development2]# uname -a Linux senldogo0183 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19

Re: [Caml-list] scalable web apps

2010-07-26 Thread Török Edwin
On Sun, 25 Jul 2010 06:52:46 -0700 (PDT) Dario Teixeira darioteixe...@yahoo.com wrote: The only circumstance where I would be cautious on relying solely on a naked Ocsigen is if you are also required to serve plenty of static content (images, etc). Even though Ocsigen includes an extension

Re: [Caml-list] scalable web apps

2010-07-26 Thread Török Edwin
On Mon, 26 Jul 2010 09:59:01 +0200 Jérémie Dimino jere...@dimino.org wrote: On Mon, Jul 26, 2010 at 10:29:04AM +0300, Török Edwin wrote: Lwt's Lwt_preemptive seems to allow one to use 'preemptive threads' (which I assume are just usual OCaml threads). So would it be possible to put

Re: [Caml-list] scalable web apps

2010-07-26 Thread Török Edwin
On Mon, 26 Jul 2010 12:57:55 -0700 Jake Donham j...@donham.org wrote: On Mon, Jul 26, 2010 at 12:59 AM, Jérémie Dimino jere...@dimino.org wrote: Yes, i tried it some time ago with two small C programs which were just reading a file on the disk. One doing read operations in a simple loop,

Re: [Caml-list] Distinguish between osx and linux programmatically

2010-07-08 Thread Török Edwin
On Thu, 8 Jul 2010 17:22:15 + David Allsopp dra-n...@metastack.com wrote: Oliver Bandel wrote: On Thu, Jul 08, 2010 at 06:01:24PM +0100, Richard Jones wrote: On Thu, Jul 08, 2010 at 10:42:40AM -0500, Romain Beauxis wrote: Le jeudi 8 juillet 2010 06:44:34, Richard Jones a écrit :

Re: [Caml-list] Unix.send blocks

2010-06-16 Thread Török Edwin
On 06/16/2010 10:32 AM, Paul Steckler wrote: I've written a wee Web server in OCaml that's compiled using the ocamlopt from the Fedora MinGW distribution of ocaml. I'm running the server in Windows 7. Sometimes after receiving several requests, the Unix.send call that sends a response

Re: [Caml-list] OCaml 3.12.0+beta1

2010-06-16 Thread Török Edwin
On 06/16/2010 04:07 PM, Damien Doligez wrote: Dear OCaml users, We have the pleasure of celebrating Bloomsday by announcing the release of OCaml version 3.12.0+beta1. This is a beta release, available as source only and intended for power users to test new features and report bugs (if

Re: [Caml-list] [ANNOUNCE] llpp

2010-06-12 Thread Török Edwin
On 06/12/2010 09:36 PM, malc wrote: Hello, Long story cut short: the PDF viewers that are available for my machine leave a lot to be desired for my usage pattern, so i had to write yet another, the code is at: http://repo.or.cz/w/llpp.git

Re: [Caml-list] build/fastworld issues

2010-06-10 Thread Török Edwin
On 2010-06-10 23:21, Nicolas Pouillard wrote: On Fri, 04 Jun 2010 10:56:51 +0300, Török Edwin edwinto...@gmail.com wrote: Hi, I have successfully built 3.12.0+dev25 with 'make world.opt', but I get an error if I try 'build/fastworld.sh'. Both 'make world.opt' and 'build/fastworld.sh' work

Re: [Caml-list] Escaped string in sexplib

2010-06-08 Thread Török Edwin
On 06/08/2010 09:52 PM, Hugo Ferreira wrote: Hello, Markus Mottl wrote: On Tue, Jun 8, 2010 at 11:44, Hugo Ferreira h...@inescporto.pt wrote: I am trying to us the Sexplib library to process data. However I am having some trouble with strings. Specifically I need to save and restore

[Caml-list] Converting variants with only constant constructors to integers

2010-06-07 Thread Török Edwin
Hi, What is the recommended way to convert a variant that has only constant constructors to an integer? (an integer that is unique for each constant constructor, preferably sequential in the order in which they are declared). I found the following two possibilities, but I am not sure if these

Re: [Caml-list] Converting variants with only constant constructors to integers

2010-06-07 Thread Török Edwin
On 06/07/2010 09:31 PM, Török Edwin wrote: On 06/07/2010 09:23 PM, Wojciech Meyer wrote: Török Edwin edwinto...@gmail.com writes: What is the recommended way to convert a variant that has only constant constructors to an integer? (an integer that is unique for each constant constructor

Re: [Caml-list] Converting variants with only constant constructors to integers

2010-06-07 Thread Török Edwin
On 06/07/2010 09:48 PM, David Allsopp wrote: Török Edwin wrote: What is the recommended way to convert a variant that has only constant constructors to an integer? (an integer that is unique for each constant constructor, preferably sequential in the order in which they are declared). type

[Caml-list] build/fastworld issues

2010-06-04 Thread Török Edwin
Hi, I have successfully built 3.12.0+dev25 with 'make world.opt', but I get an error if I try 'build/fastworld.sh'. Both 'make world.opt' and 'build/fastworld.sh' work fine on ocaml 3.11.2. Here is the error: + ./ocamlopt.opt -nostdlib -c -g -warn-error A -I otherlibs/dynlink/nat -I stdlib -o

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

2010-05-24 Thread Török Edwin
On 2010-05-24 04:39, Paul Steckler wrote: Has anyone gotten an OCaml multithreaded program to build for Win32 native threads using the MinGW ocaml cross-compiler? I'm not a windows user, but I tried with Debian's mingw32-ocaml package and wine: it seems to work. I don't know if it uses native

Re: [Caml-list] OCaml defunctorization and other optimizations

2010-05-20 Thread Török Edwin
On 05/20/2010 02:40 PM, Julien Signoles wrote: Hello, 2010/5/20 Török Edwin edwinto...@gmail.com mailto:edwinto...@gmail.com On 05/20/2010 11:41 AM, Julien Signoles wrote: I think that'll have to be someone else than me, as I consider myself just a beginner in OCaml

[Caml-list] OCaml defunctorization and other optimizations

2010-05-19 Thread Török Edwin
Hi, I've seen in several places recommendations to use 'ocamldefun' to speed up OCaml programs that use functors heavily [*]. I was able to find the sources via the wayback machine. Unsurprisingly it doesn't build with OCaml 3.11.2 (it wants OCaml 3.06). Is there a more up to date variant of