Re: [Caml-list] Chain Camlp4 syntax extensions?

2010-09-28 Thread Dmitry Bely
On Tue, Sep 28, 2010 at 8:07 PM, Jake Donham j...@donham.org wrote: On Tue, Sep 28, 2010 at 6:13 AM, Dmitry Bely dmitry.b...@gmail.com wrote: I have two similar syntax extension that generate some functions for each type in the module: EXTEND Gram  str_item:    [ [ type; tdl = LIST1

Re: [Caml-list] Re: Question about float refs.

2010-09-01 Thread Dmitry Bely
+. 0.); Printf.printf words: %f\n (Gc.stat ()).Gc.minor_words and the reference will be placed in a register (Caml heap will not be used inside the loop) Do you have any idea why the optimizer needs that? - Dmitry Bely ___ Caml-list mailing list

Re: [Caml-list] Re: Question about float refs.

2010-08-23 Thread Dmitry Bely
black magic is needed: let r = ref 0.0 in for i = 0 to 1000_000_000 do r := float i done; Printf.printf %f\n (!r +. 0.); Printf.printf words: %f\n (Gc.stat ()).Gc.minor_words and the reference will be placed in a register (Caml heap will not be used inside the loop) - Dmitry Bely

Re: [Caml-list] About compiling native code on windows platform

2010-08-10 Thread Dmitry Bely
error like this: cannot find file libgtk-win32-2.0 error:error during linking how to solve this problem? Read LablGtk2-install.txt and follow the instructions. - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi

Re: [Caml-list] OCaml 3.12.0+beta1

2010-06-24 Thread Dmitry Bely
with Ocaml 3.12? - Dmitry Bely ___ 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

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

2010-05-14 Thread Dmitry Bely
int main(int argc, char** argv) { for (int i=0; i argc; ++i) { puts(argv[i]); } return 0; } and you'll see. - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives

Re: [Caml-list] Re: [ANN] Camomile 0.7.3

2010-05-14 Thread Dmitry Bely
= Wchar.t type wstring = Wstring.t (**/**) - Dmitry Bely ___ 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

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

2010-05-13 Thread Dmitry Bely
expect), but console output functions perform ANSI-OEM code page translation. So you see a garbage. - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr

Re: [Caml-list] about OcamIL

2010-05-07 Thread Dmitry Bely
On Thursday 06 May 2010 06:43:21 am Dmitry Bely wrote: Ironically it's also not entirely true. F# works well under Mono/Unix. A little off topic, but how is Mono/Unix these days?  Last I checked (2 years ago) it implemented the basic libraries and runtimes but had terrible performance

Re: [Caml-list] about OcamIL

2010-05-06 Thread Dmitry Bely
for some applications due to threads running in parallel on multiple cores. But F# is very different from Ocaml. - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http

Re: [Caml-list] Statically linked win32 libcamlrun.lib?

2010-04-20 Thread Dmitry Bely
On Tue, Apr 20, 2010 at 7:48 PM, Lally Singh lally.si...@gmail.com wrote: On Thu, Apr 15, 2010 at 4:16 PM, Dmitry Bely dmitry.b...@gmail.com wrote: On Thu, Apr 15, 2010 at 11:16 PM, Lally Singh lally.si...@gmail.com wrote: On Thu, Apr 15, 2010 at 2:59 AM, Dmitry Bely dmitry.b...@gmail.com wrote

Re: [Caml-list] Statically linked win32 libcamlrun.lib?

2010-04-15 Thread Dmitry Bely
to that -- or at least hoping to. Thanks in advance for any help! - Dmitry Bely ___ 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

Re: [Caml-list] Statically linked win32 libcamlrun.lib?

2010-04-15 Thread Dmitry Bely
On Thu, Apr 15, 2010 at 11:16 PM, Lally Singh lally.si...@gmail.com wrote: On Thu, Apr 15, 2010 at 2:59 AM, Dmitry Bely dmitry.b...@gmail.com wrote: On Thu, Apr 15, 2010 at 3:39 AM, Lally Singh lally.si...@gmail.com wrote: Is it possible to statically link libcamlrun.lib, so it'll work

Re: [Caml-list] Statically linked win32 libcamlrun.lib?

2010-04-15 Thread Dmitry Bely
On Thu, Apr 15, 2010 at 11:16 PM, Lally Singh lally.si...@gmail.com wrote: On Thu, Apr 15, 2010 at 2:59 AM, Dmitry Bely dmitry.b...@gmail.com wrote: On Thu, Apr 15, 2010 at 3:39 AM, Lally Singh lally.si...@gmail.com wrote:  Is it possible to statically link libcamlrun.lib, so it'll work

Re: [Caml-list] Building ocaml on Win32 using VS 2008

2010-04-14 Thread Dmitry Bely
for the Win32, and then make -f Makefile.nt world). Just to confirm that: it's build with my VS2008 without any special efforts. Lally, are you sure that the correct bootstrap compiler is used? - Dmitry Bely ___ Caml-list mailing list. Subscription management

Re: [Caml-list] Optimizing Float Ref's

2010-03-31 Thread Dmitry Bely
(a:float array) = let m = ref min_float in for i = 0 to (Array.length a) - 1 do if a.(i) !m then m := a.(i) done; !m !m is not unboxed (Ocaml 3.11). Should it? - Dmitry Bely ___ Caml-list mailing list. Subscription management: http

Re: [Caml-list] Optimizing Float Ref's

2010-03-31 Thread Dmitry Bely
On Wed, Mar 31, 2010 at 9:55 PM, Jake Donham j...@donham.org wrote: On Wed, Mar 31, 2010 at 10:21 AM, Dmitry Bely dmitry.b...@gmail.com wrote: let max_val (a:float array) =  let m = ref min_float in  for i = 0 to (Array.length a) - 1 do    if a.(i) !m    then m := a.(i)  done;  !m !m

Re: [Caml-list] Optimizing Float Ref's

2010-03-31 Thread Dmitry Bely
rid of it? My best achievement so far is Try tail-recursion. Won't work. Show the code. - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr

Re: [Caml-list] testers wanted for experimental SSE2 back-end

2010-03-29 Thread Dmitry Bely
{emit_reg dest}, REAL4 PTR {emit_addressing addr i.arg 0}\n`; ` cvtss2sd {emit_reg dest}, {emit_reg dest}\n` can be written as ` cvtss2sd {emit_reg dest}, REAL4 PTR {emit_addressing addr i.arg 0}\n` - Dmitry Bely ___ Caml

Re: [Caml-list] User-defined printers and external C code

2010-03-28 Thread Dmitry Bely
automatically then needed. - Dmitry Bely ___ 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

Re: [Caml-list] testers wanted for experimental SSE2 back-end

2010-03-23 Thread Dmitry Bely
regarding the code (fast math functions via x87 are questionable, optimization of floating compare etc.) Where to discuss that - just here or there is some entry in Mantis? - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr

Re: [Caml-list] testers wanted for experimental SSE2 back-end

2010-03-23 Thread Dmitry Bely
. You want : let round x = floor (x +. 0.5) ...and you get a floor() C call. I would better use let round x = truncate (x +. (if x 0. then 0.5 else -0.5)) - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin

Re: [Caml-list] Why don't use batteries

2009-09-07 Thread Dmitry Bely
of libasmrun.a (which IIRC was a feature added in 3.11)? Rich. - Dmitry Bely ___ 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

Re: [Caml-list] Is it possible to debug (multithreaded) lablgtk2 apps?

2009-06-09 Thread Dmitry Bely
ending inconsistency and so incorrectly calculate the place. With the more complex app I wanted to work on, the IHM is never shown. I think that I will revert to the good old Printf method. It's up to you but first I would try to find out why it does not work. - Dmitry Bely

Re: [Caml-list] Ocamlopt x86-32 and SSE2

2009-05-11 Thread Dmitry Bely
it if there is a consensus). Still there is a plenty of low-power/embedded x86 hardware that does not support SSE2. And one will be able to compare x87 and SSE2 backends performance to convince him/herself that the play really worths the candle :-) - Dmitry Bely

Re: [Caml-list] Ocamlopt x86-32 and SSE2

2009-05-11 Thread Dmitry Bely
a proof-of-the-concept implementation? - Dmitry Bely ___ 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

Re: [Caml-list] Ocamlopt x86-32 and SSE2

2009-05-11 Thread Dmitry Bely
On Mon, May 11, 2009 at 1:26 PM, Jon Harrop j...@ffconsultancy.com wrote: On Monday 11 May 2009 09:05:08 Dmitry Bely wrote: I think it would be the major code rewrite (if ever possible). Merging SSE2 from amd64 into i386 code generator took about a day of my efforts. How much time LLVM

Re: [Caml-list] ocamlfind question on cygwin

2009-05-06 Thread Dmitry Bely
/ocaml/pkg-lib META ocamlfind: Bad configuration: Cannot mkdir /home/Administrateur/godi/lib/ocaml/pkg-lib\lwt because a path component does not exist or is not a directory Probably your ocamlfind is a mingw (native Win32) application, and so you cannot use cygwin paths (/home/...). - Dmitry

Re: [Caml-list] Assembly labels overflow

2009-05-05 Thread Dmitry Bely
during assembly generation. No, I think it's not possible. If you need to do some action conditionally, how can you manage without jumps and labels? - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman

Re: [Caml-list] Ocamlopt code generator question

2009-05-05 Thread Dmitry Bely
to work OK: beyond my own code all tests found in Ocaml CVS test directory are passed. Of course this is idea is not new - you had working IA32+SSE2 back end several years ago [1] but unfortunately never released it to the public. Is this of any interest to anybody? - Dmitry Bely [1] http

Re: [Caml-list] Re: Ocamlopt code generator question

2009-05-05 Thread Dmitry Bely
be called a bug). - Dmitry Bely ___ 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-list] Re: Ocamlopt code generator question

2009-04-29 Thread Dmitry Bely
On Wed, Apr 29, 2009 at 8:28 PM, Jeffrey Scofield jeff...@pythagorion.local wrote: Dmitry Bely dmitry.b...@gmail.com writes: For amd64 we have in asmcomp/amd64/proc_nt.mlp: (*  xmm0 - xmm15  100 - 115       xmm0 - xmm9: Caml function arguments                                 xmm0 - xmm3: C

Re: [Caml-list] C wrappers for Ocaml functions

2009-04-14 Thread Dmitry Bely
-lcurses -lm ? - Dmitry Bely ___ 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-list] Portable Ocaml multiprocessing?

2009-01-28 Thread Dmitry Bely
There are numerous environments/libraries that support process-based Ocaml multiprocessing: jocaml, OCamlP3l, OcamlMPI (and probably others). Do I get it right that all of them are Unix-only? - Dmitry Bely ___ Caml-list mailing list. Subscription

Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?

2008-10-21 Thread Dmitry Bely
convenient: hyperlink jumps, code outline, type tooltip on mouse hoovering, completion etc. Give it a try. - Dmitry Bely ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http

Re: [Caml-list] Re: Road to native windows OCaml...

2008-10-15 Thread Dmitry Bely
On Wed, Oct 15, 2008 at 6:35 PM, Kuba Ober [EMAIL PROTECTED] wrote: On Wednesday 15 October 2008, Dmitry Bely wrote: On Wed, Oct 15, 2008 at 4:35 PM, Kuba Ober [EMAIL PROTECTED] wrote: For example, if you download and install OCaml MSVC from http://caml.inria.fr and you open a MS Visual

Re: [Caml-list] Re: Road to native windows OCaml...

2008-10-15 Thread Dmitry Bely
;-) All you need is cl, ml and link I think (all are MSVC tools). And you need masm too, right? ml is just that masm. It's included into MS Visual Studio Professional edition and up. For Standard edition and below there is free www.masm32.com. - Dmitry Bely

Re: Re : [Caml-list] Road to native windows OCaml...

2008-10-14 Thread Dmitry Bely
Win32 Ocaml? - Dmitry Bely ___ 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