Alan Schmitt | 5 Dec 08:07

Re: Computing with big numbers?

On 4 déc. 08, at 17:06, Florian Hars wrote:

> Alan Schmitt schrieb:
>> But I don't think this applies here, as the hashes I'm
>> looking at are the one used by Unison to identify file contents.
>
> Then it is *especially* relevant, as it is quite trivial to generate
> several files with  different content and the same MD5 hash, all you
> need is a Playstation 3:
> http://www.win.tue.nl/hashclash/Nostradamus/

Thanks for the link, but I wasn't considering a malicious attack: if  
someone were able to modify my files, I would not worry about Unison  
not detecting (thus not propagating) a malicious change.

Alan
_______________________________________________
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.inria.fr/bin/caml-bugs
Daniel Bünzli | 3 Dec 10:58

Re: ocamlbuild rule with recursive action


Le 3 déc. 08 à 10:44, Romain Bardou a écrit :

> Well, you can also simply execute the commands yourself, in a loop,  
> using Command.execute or Command.execute_many.

But doesn't this break things ? Actions are supposed to build the  
command not execute it.

Daniel

P.S. something like

Rec of 'a * ('a -> action -> [ `Stop | `Step of command * 'a ])

would be better or

Rec of 'a * ('a -> action-> command * 'a) with the convention that  
returning Nop stops the recursion.

_______________________________________________
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.inria.fr/bin/caml-bugs

Markus Mottl | 2 Dec 20:21

Re: Issues with Sexplib (#2)

On Sat, Nov 29, 2008 at 12:14 PM, Dario Teixeira
<darioteixeira <at> yahoo.com> wrote:
> It compiles fine.  Now uncomment the "(* with sexp *)" parts, such that it
> makes use of the Sexplib syntax extension.  The compilation fails on the
> definition of body_sectional_order_t, with an error "type_is_recursive:
> unknown type construct".  Is this a known limitation in Type-conv/Sexplib?

This should be fixed in newer releases of type-conv.

> One last note to the authors of Sexplib: for each reporting of an issue with
> Sexplib there are tons of unreported happy cases.  It is such a great tool
> that I find myself using it everywhere, hence the inevitability of every
> now and then running into problems...

Thanks for the feedback!

Regards,
Markus

--

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl <at> gmail.com

_______________________________________________
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.inria.fr/bin/caml-bugs

(Continue reading)

DooMeeR | 2 Dec 12:27

Re: ocamlbuild rule with recursive action

Daniel Bünzli a écrit :
> Hello,
> 
> Is it possible to define a rule with an action that is performed 
> repeatedly until a condition is reached ?
> 
> Best,
> 
> Daniel

Well, you can define a rule like this :

rule ~prod: "%.rec" (fun env build ->
   let x = env "%2.rec" in (* a new fresh name *)
   if some condition then build x else Nop)

When your rule is executed, for exemple to produce "toto.rec", it will 
(if some condition) first produce "toto2.rec", which will produce 
"toto22.rec", and so on until some condition is false.

I didn't try it though.

--

-- 
Romain Bardou

_______________________________________________
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
(Continue reading)

Martin Jambon | 1 Dec 13:52

Re: Computing with big numbers?

Alan Schmitt wrote:
> Hello,
> 
> In preparation for a talk I'm going to give, I wanted to estimate how
> good 128 bits MD5 hashes were: how many hashes must be taken before the
> probability for a collision become non negligible? (I'm assuming
> equi-probability of every hash.)
> 
> The brute force approach is simply to enumerate the non-collision
> probability for k different hashes, and compute until it becomes lower
> than 1. This probability is (writing N for 2 ^ 128):
> N * (N-1) * (N - 2) * ... * (N - k)
> ---------------------------------------
> N^k
> 
> I tried computing this using the bignum library that comes with OCaml,
> and it slows down to a crawl very fast (for k ~ 1000).
> 
> So I tried to be more subtle and approximate the result (using
> Stirling's approximation of factorials), but OCaml's floats are not
> precise enough to yield anything significant. (I'm trying to compute the
> log of the approximation of N! / (N^k * (N-k)!), which is N (ln N) - N -
> (k (ln N) + (N - k)(ln (N - k)) - (N - k)).)
> 
> Is there a library with better floating point precision than the OCaml one?

If I understand your problem correctly, this is the so-called birthday
problem with 2^128 days in a year. The Wikipedia article gives useful
approximations:

(Continue reading)

William Le Ferrand | 30 Nov 13:09

Re: [announce] O'Browser : OCaml on browsers

Hi !

Thank you for this amazing work !

I'm rewriting large parts of my website using this tool, and I may have found two little bugs :

* get_attribute (in rtjs.js)

when get_attribute "toto" returns a boolean, value_from_string returns the empty string (this is nasty ..)

(temporary) solution : in rtjs.js, just cast on line 33 with something like

  return value_from_string (v == null ? "" : (v+""));

* input (in js.ml)

it seems that the editable function

    editable = (
      function
          true -> (try  Node.remove_attribute node "disabled" with _  -> ())
        | false -> Node.set_attribute node "disabled" "disabled"
);

works better. (at least it works with buttons, check boxes and so on)

Thank you again !

All best,

William Le Ferrand

www.beouifi.org

2008/11/21 Benjamin Canou <benjamin.canou <at> gmail.com>
 Hi,

>From Kuba Ober:
> Pardon the question, but is this meant to be "useful" in the future,
> or is it just a fun experiment (in which case the next target should
> be brainfuck).
Coming soon: the OCaml VM on a turing machine !

>From Burgisser Francois :
> Good idea but maybe a browser plugin to manipulate DOM would be much
> more efficient.
>From Gabriel Kerneis:
> But, sadly, much less portable.
>From Jon Harrop:
> Could you write a compiler and call eval to get better performance?
>From David Thomas:
> I'd like to see a plugin that makes available to JS a function to
> execute ocaml bytecode.

Our plan is to achieve efficiency with a (not yet available) browser
plug-in (the original bytecode interpreter or the native compiler) while
remaining portable by using the JavaScript VM where the plug-in is not
available. So we don't currently focus on optimizing (and complexifying)
too much the JavaScript version.

>From David Teller:
> To me, the fact that you can write portable lightweight applets sounds
> like a good enough reason. That and the fact that I can see this being
> used by stuff like Ocsigen to make for (even) richer client-server
> applications.

Indeed, as Vincent wrote, even if O'Browser is at this point only a
client-side scripting core, it takes place into the Ocsigen project and
will be used to interact with (OCaml) server code (in its current form
or not).

 Benjamin Canou.

_______________________________________________
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.inria.fr/bin/caml-bugs



--
William Le Ferrand

E-mail : william <at> beouifi.org
Mobile : +33 6 84 01 52 92
_______________________________________________
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.inria.fr/bin/caml-bugs
Serge Aleynikov | 27 Nov 23:55

Re: OCaml 3.11.0 release candidate

Is there a document listing new features / bug fixes between 3.10 and 3.11?

Serge

Xavier Leroy wrote:
> Damien Doligez wrote:
> 
>> We are closing in on version 3.11.0.  A Release Candidate is now available.
>> The release candidate is available here:
>> < http://caml.inria.fr/pub/distrib/ocaml-3.11/ >
> 
> The documentation for 3.11 is also available from the same place.  The
> HTML manual can be browsed online at
> 
> http://caml.inria.fr/pub/docs/manual-ocaml-311/index.html
> 
> Enjoy,
> 
> - Xavier Leroy
> 
> _______________________________________________
> 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.inria.fr/bin/caml-bugs
> 

_______________________________________________
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.inria.fr/bin/caml-bugs

Richard Jones | 27 Nov 12:55
Favicon

Re: OCaml 3.11.0 release candidate

On Wed, Nov 26, 2008 at 11:29:04PM +0100, Stéphane Glondu wrote:
> Richard Jones wrote:
> > Two camlp4 packages so far have given this error message, which is new
> > since I tried 3.11.0+beta1:
> 
> You mean two packages using camlp4, don't you?

As it turns out, many packages using camlp4.

> > File "_none_", line 1, characters 0-1:
> > Error: Error while linking /usr/lib/ocaml/camlp4/camlp4lib.cma(Camlp4):
> > Reference to undefined global `Dynlink'
> 
> That's probably a fix to be done in the packages using camlp4. See:
> 
>   http://caml.inria.fr/mantis/view.php?id=4568
> 
> Maybe it should be documented as a "can possibly break existing code
> (actually, Makefiles)" in the Changes file...?

So as I understand this, every package which uses camlp4lib.cma has to
be changed to add 'dynlink.cma' before camlp4lib.cma?

Rich.

--

-- 
Richard Jones
Red Hat

_______________________________________________
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.inria.fr/bin/caml-bugs

Alyssa.voyante | 27 Nov 12:26
Favicon

Alyssa vous aide et vous dévoile les secrets

Bonjour ,
Je suis ALYSSA voyante et surtout médium de naissance, je vous écris cet e-mail aujourd’hui car j’ai réalisé un tirage sur vous et il s’avère que vous êtes entrain de vivre un situation qui a suscité chez moi un grand intérêt, ce qui m’a permis d’effectuer un tirage avec beaucoup  d’implication.
 En effet votre jeu m’a révélé une sensibilité profonde de votre part, et des faits passés et surtout présents difficiles. Il ressort que vous êtes plongée aujourd’hui dans l’incertitude, vous qui étiez déjà d’un naturel  méfiant du fait de votre passé. Les cartes montrent que vous avez souvent ressenti de l’incompréhension de la part de votre entourage, c’est certainement du a l’important choc émotionnel survenu dans votre enfance. Vous l’avez vécu comme une privation affective. Aujourd’hui vous êtes à fleur de peau, face à une sorte de lassitude psychologique.
 Il est des jours avec et des jours sans, mais depuis quelques temps, vous avez surtout l’impression que votre vie s’écoule au rythme des problèmes et des ennuis.  Vous n’en voyez plus la fin.
 Vous êtes quelqu’un d’entier, quelqu’un qui habituellement s’affirme. Mais aujourd’hui, vous vivez dans un contexte qui ne vous convient pas complètement. Je ressors également autour de vous la présence d’une personne exerçant directement ou indirectement un certaine influence négative à votre égard.
 Quoi qu’il en soit, je dirai qu’aujourd’hui votre vie est mise entre parenthèse car vous n’êtes pas toujours appréciée à votre juste valeur. Pourtant, vous êtes dans un cycle ou votre désir personnel et social est votre véritable moteur. Un changement très net s’annonce, c’est soit professionnel soit affectif, mais cela survient d’ici 2 mois au maximum.
 Il faut savoir également que certaines cartes restent floues, notamment  une lame renversée qui m’inquiète car elle pourrait créer des contretemps voire un échec.
  vous comprendrez que je n’ai pas toutes les précisions nécessaires pour vous aiguiller d’avantage puisque j’ai pour tout éléments votre nom, votre prénom et votre date de naissance. Je reste avant tout une médium auditive, j’ai besoin de vous entendre pour aller plus loin. Je peux vous aider à trouver la marche à suivre pour contourner les obstacles mais pour cela j’ai besoin de votre voix. Cela va me procurer des ressentis et des flashs me permettant une réelle projection dans l’avenir proche et lointain mais surtout une clairvoyance précise.
 Vous pourrez ainsi opérer un changement de conception et de direction qui aujourd’hui s’impose a vous. J’ai des révélations importantes à vous faire afin de pouvoir mieux gérer votre vie.
 Appelez  moi au plus vite.
                                            Tél 1 : 08 92 35 01 06  (0,34 €/min)
                               Tél 2 : 08 92 35 05 07  (0,34 €/min)
 
 Amicalement,
Alyssa.
<at> Mail : Alyssa.voyante <at> Gmail.com

Site officiel :         wwww.voyancealyssa.com

                   www.Alyssavoyance.fr

_______________________________________________
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.inria.fr/bin/caml-bugs
Andres Varon | 26 Nov 19:11

Re: OCaml 3.11.0 release candidate


On Nov 26, 2008, at 12:38 PM, Andres Varon wrote:

>
> On Nov 26, 2008, at 12:05 PM, Xavier Leroy wrote:
>
>>> So far our tests have compiled and run successfully in most  
>>> platforms
>>> [1] excepting Windows 64 bits (but it's the first time I attempt to
>>> compile in this architecture). I am getting this error message:
>>
>> There are two problems with Windows 64 that I forgot to fix before
>> this RC1 release; this is one of them.  A patch is available at
>>
>> http://gallium.inria.fr/~xleroy/ocaml-3.11rc1-win64.patch
>>
>
> Thanks. This time the compilation went further, but failed with the  
> errors below.

Answering myself, the problem is my own specification of the cl  
command line. Shouldn't have added those /I options. Clearly I'm not  
comfortable in this environment ...

best,

Andres

>
>
>
>> andres <at> WIN-X85PMN663RN ~/ocaml-3.11.0+rc1
>> $ make -f Makefile.nt  world
>> ....
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/stdlib'
>> make[1]: Nothing to be done for `all'.
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/stdlib'
>> for i in win32unix systhreads str num win32graph dynlink bigarray;  
>> do make -f Ma
>> kefile.nt  -C otherlibs/$i all; done
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/win32unix'
>> cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
>> Microsoft Platform SD
>> K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
>> Include' /Ox /MD -I.
>> ./../byterun  -I../unix -c accept.c
>> accept.c
>> accept.c(58) : error C2146: syntax error : missing ';' before  
>> identifier 'fd'
>> make[1]: *** [accept.obj] Error 2
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> win32unix'
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/systhreads'
>>
>> cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
>> Microsoft Platform SD
>> K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
>> Include' /Ox /MD -I.
>> ./../byterun  -c win32.c
>> win32.c
>> win32.c(217) : error C2037: left of 'mutex' specifies undefined  
>> struct/union 'ch
>> annel'
>> win32.c(225) : error C2037: left of 'mutex' specifies undefined  
>> struct/union 'ch
>> annel'
>> win32.c(228) : error C2037: left of 'mutex' specifies undefined  
>> struct/union 'ch
>> annel'
>> win32.c(231) : error C2037: left of 'mutex' specifies undefined  
>> struct/union 'ch
>> annel'
>> win32.c(231) : error C2198: 'WaitForSingleObject' : too few  
>> arguments for call t
>> hrough pointer-to-function
>> win32.c(236) : error C2037: left of 'mutex' specifies undefined  
>> struct/union 'ch
>> annel'
>> win32.c(236) : warning C4022: 'WaitForSingleObject' : pointer  
>> mismatch for actua
>> l parameter 1
>> win32.c(236) : error C2198: 'WaitForSingleObject' : too few  
>> arguments for call t
>> hrough pointer-to-function
>> win32.c(248) : error C2037: left of 'mutex' specifies undefined  
>> struct/union 'ch
>> annel'
>> win32.c(248) : error C2198: 'ReleaseMutex' : too few arguments for  
>> call through
>> pointer-to-function
>> win32.c(328) : error C2065: 'caml_channel_mutex_free' : undeclared  
>> identifier
>> win32.c(328) : warning C4047: '=' : 'int' differs in levels of  
>> indirection from
>> 'void (__cdecl *)(channel *)'
>> win32.c(329) : error C2065: 'caml_channel_mutex_lock' : undeclared  
>> identifier
>> win32.c(329) : warning C4047: '=' : 'int' differs in levels of  
>> indirection from
>> 'void (__cdecl *)(channel *)'
>> win32.c(330) : error C2065: 'caml_channel_mutex_unlock' :  
>> undeclared identifier
>> win32.c(330) : warning C4047: '=' : 'int' differs in levels of  
>> indirection from
>> 'void (__cdecl *)(channel *)'
>> win32.c(331) : error C2065: 'caml_channel_mutex_unlock_exn' :  
>> undeclared identif
>> ier
>> win32.c(331) : warning C4047: '=' : 'int' differs in levels of  
>> indirection from
>> 'void (__cdecl *)(void)'
>> make[1]: *** [win32_b.obj] Error 2
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> systhreads'
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/str'
>> cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
>> Microsoft Platform SD
>> K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
>> Include' /Ox /MD -I.
>> ./../byterun   -c strstubs.c
>> strstubs.c
>> strstubs.c(294) : warning C4047: 'initializing' : 'backtrack_stack  
>> *' differs in
>> levels of indirection from 'int'
>> strstubs.c(345) : error C2065: 'res' : undeclared identifier
>> strstubs.c(346) : error C2143: syntax error : missing ';' before  
>> 'type'
>> strstubs.c(347) : error C2143: syntax error : missing ';' before  
>> 'type'
>> strstubs.c(348) : error C2143: syntax error : missing ';' before  
>> 'type'
>> strstubs.c(349) : error C2143: syntax error : missing ';' before  
>> 'type'
>> strstubs.c(351) : error C2065: 'n' : undeclared identifier
>> strstubs.c(352) : error C2065: 'i' : undeclared identifier
>> strstubs.c(353) : error C2065: 'group' : undeclared identifier
>> strstubs.c(353) : warning C4047: '=' : 'int' differs in levels of  
>> indirection fr
>> om 're_group *'
>> strstubs.c(354) : error C2223: left of '->start' must point to  
>> struct/union
>> strstubs.c(354) : error C2223: left of '->end' must point to struct/ 
>> union
>> strstubs.c(358) : error C2223: left of '->start' must point to  
>> struct/union
>> strstubs.c(358) : error C2065: 'starttxt' : undeclared identifier
>> strstubs.c(359) : error C2223: left of '->end' must point to struct/ 
>> union
>> strstubs.c(462) : error C2275: 'mlsize_t' : illegal use of this  
>> type as an expre
>> ssion
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \mlvalues.h(58) : see decl
>> aration of 'mlsize_t'
>> strstubs.c(462) : error C2146: syntax error : missing ';' before  
>> identifier 'sta
>> rt'
>> strstubs.c(462) : error C2065: 'start' : undeclared identifier
>> strstubs.c(462) : error C2065: 'end' : undeclared identifier
>> strstubs.c(462) : error C2065: 'len' : undeclared identifier
>> strstubs.c(463) : error C2143: syntax error : missing ';' before  
>> 'type'
>> strstubs.c(464) : error C2143: syntax error : missing ';' before  
>> 'type'
>> strstubs.c(467) : error C2065: 'p' : undeclared identifier
>> strstubs.c(467) : warning C4047: '=' : 'int' differs in levels of  
>> indirection fr
>> om 'char *'
>> strstubs.c(470) : error C2065: 'c' : undeclared identifier
>> strstubs.c(470) : error C2100: illegal indirection
>> strstubs.c(475) : error C2100: illegal indirection
>> strstubs.c(496) : warning C4047: '=' : 'int' differs in levels of  
>> indirection fr
>> om 'char *'
>> strstubs.c(497) : error C2065: 'q' : undeclared identifier
>> strstubs.c(497) : warning C4047: '=' : 'int' differs in levels of  
>> indirection fr
>> om 'char *'
>> strstubs.c(500) : error C2100: illegal indirection
>> strstubs.c(502) : error C2100: illegal indirection
>> strstubs.c(502) : error C2106: '=' : left operand must be l-value
>> strstubs.c(504) : error C2100: illegal indirection
>> strstubs.c(507) : error C2100: illegal indirection
>> strstubs.c(507) : error C2106: '=' : left operand must be l-value
>> strstubs.c(514) : warning C4022: 'memmove' : pointer mismatch for  
>> actual paramet
>> er 1
>> strstubs.c(518) : error C2100: illegal indirection
>> strstubs.c(518) : error C2106: '=' : left operand must be l-value
>> strstubs.c(518) : error C2100: illegal indirection
>> strstubs.c(518) : error C2106: '=' : left operand must be l-value
>> make[1]: *** [strstubs.obj] Error 2
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> str'
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/num'
>> make[1]: Nothing to be done for `all'.
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> num'
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/win32graph'
>>
>> cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
>> Microsoft Platform SD
>> K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
>> Include' /Ox /MD -I.
>> ./../byterun   -c draw.c
>> draw.c
>> draw.c(555) : error C2146: syntax error : missing ';' before  
>> identifier 'img'
>> draw.c(618) : error C2146: syntax error : missing ';' before  
>> identifier 'matrix'
>>
>> make[1]: *** [draw.obj] Error 2
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> win32graph'
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/dynlink'
>> make[1]: Nothing to be done for `all'.
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> dynlink'
>> make[1]: Entering directory `/home/andres/ocaml-3.11.0+rc1/ 
>> otherlibs/bigarray'
>> cl /nologo -D_CRT_SECURE_NO_DEPRECATE /I 'C:/Program Files/ 
>> Microsoft Platform SD
>> K/Include/crt'  /I 'C:/Program Files/Microsoft Platform SDK/ 
>> Include' /Ox /MD -I.
>> ./../byterun  -I../win32unix -DIN_OCAML_BIGARRAY -DCAML_NAME_SPACE - 
>> c bigarray_s
>> tubs.c
>> bigarray_stubs.c
>> bigarray_stubs.c(840) : warning C4047: '=' : 'caml_ba_proxy *'  
>> differs in levels
>> of indirection from 'int'
>> bigarray_stubs.c(856) : error C2065: 'res' : undeclared identifier
>> bigarray_stubs.c(857) : error C2275: 'intnat' : illegal use of this  
>> type as an e
>> xpression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(857) : error C2146: syntax error : missing ';'  
>> before identifie
>> r 'index'
>> bigarray_stubs.c(857) : error C2065: 'index' : undeclared identifier
>> bigarray_stubs.c(857) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(858) : error C2143: syntax error : missing ';'  
>> before 'type'
>> bigarray_stubs.c(859) : error C2275: 'intnat' : illegal use of this  
>> type as an e
>> xpression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(859) : error C2146: syntax error : missing ';'  
>> before identifie
>> r 'offset'
>> bigarray_stubs.c(859) : error C2065: 'offset' : undeclared identifier
>> bigarray_stubs.c(860) : error C2275: 'intnat' : illegal use of this  
>> type as an e
>> xpression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(860) : error C2065: 'sub_dims' : undeclared  
>> identifier
>> bigarray_stubs.c(861) : error C2143: syntax error : missing ';'  
>> before 'type'
>> bigarray_stubs.c(864) : error C2065: 'num_inds' : undeclared  
>> identifier
>> bigarray_stubs.c(870) : error C2065: 'i' : undeclared identifier
>> bigarray_stubs.c(870) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(871) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(872) : warning C4047: 'function' : 'intnat *'  
>> differs in levels
>> of indirection from 'int'
>> bigarray_stubs.c(872) : warning C4024: 'caml_ba_offset' : different  
>> types for fo
>> rmal and actual parameter 2
>> bigarray_stubs.c(873) : warning C4047: '=' : 'int' differs in  
>> levels of indirect
>> ion from 'intnat *'
>> bigarray_stubs.c(877) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(878) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(879) : warning C4047: 'function' : 'intnat *'  
>> differs in levels
>> of indirection from 'int'
>> bigarray_stubs.c(879) : warning C4024: 'caml_ba_offset' : different  
>> types for fo
>> rmal and actual parameter 2
>> bigarray_stubs.c(880) : warning C4047: '=' : 'int' differs in  
>> levels of indirect
>> ion from 'intnat *'
>> bigarray_stubs.c(882) : error C2065: 'sub_data' : undeclared  
>> identifier
>> bigarray_stubs.c(884) : warning C4047: '=' : 'int' differs in  
>> levels of indirect
>> ion from 'char *'
>> bigarray_stubs.c(886) : warning C4022: 'caml_ba_alloc' : pointer  
>> mismatch for ac
>> tual parameter 3
>> bigarray_stubs.c(886) : warning C4047: 'function' : 'intnat *'  
>> differs in levels
>> of indirection from 'int'
>> bigarray_stubs.c(886) : warning C4024: 'caml_ba_alloc' : different  
>> types for for
>> mal and actual parameter 4
>> bigarray_stubs.c(902) : error C2275: 'intnat' : illegal use of this  
>> type as an e
>> xpression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(902) : error C2146: syntax error : missing ';'  
>> before identifie
>> r 'ofs'
>> bigarray_stubs.c(902) : error C2065: 'ofs' : undeclared identifier
>> bigarray_stubs.c(903) : error C2275: 'intnat' : illegal use of this  
>> type as an e
>> xpression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(903) : error C2146: syntax error : missing ';'  
>> before identifie
>> r 'len'
>> bigarray_stubs.c(903) : error C2065: 'len' : undeclared identifier
>> bigarray_stubs.c(904) : error C2143: syntax error : missing ';'  
>> before 'type'
>> bigarray_stubs.c(905) : error C2275: 'intnat' : illegal use of this  
>> type as an e
>> xpression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(905) : error C2146: syntax error : missing ';'  
>> before identifie
>> r 'mul'
>> bigarray_stubs.c(905) : error C2065: 'mul' : undeclared identifier
>> bigarray_stubs.c(906) : error C2143: syntax error : missing ';'  
>> before 'type'
>> bigarray_stubs.c(913) : error C2065: 'changed_dim' : undeclared  
>> identifier
>> bigarray_stubs.c(925) : warning C4047: '=' : 'int' differs in  
>> levels of indirect
>> ion from 'char *'
>> bigarray_stubs.c(927) : warning C4022: 'caml_ba_alloc' : pointer  
>> mismatch for ac
>> tual parameter 3
>> bigarray_stubs.c(1049) : error C2275: 'intnat' : illegal use of  
>> this type as an
>> expression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(47) : see declar
>> ation of 'intnat'
>> bigarray_stubs.c(1049) : error C2146: syntax error : missing ';'  
>> before identifi
>> er 'dim'
>> bigarray_stubs.c(1049) : error C2065: 'dim' : undeclared identifier
>> bigarray_stubs.c(1049) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(1050) : error C2275: 'mlsize_t' : illegal use of  
>> this type as a
>> n expression
>>        ../../byterun\mlvalues.h(58) : see declaration of 'mlsize_t'
>> bigarray_stubs.c(1050) : error C2146: syntax error : missing ';'  
>> before identifi
>> er 'num_dims'
>> bigarray_stubs.c(1050) : error C2065: 'num_dims' : undeclared  
>> identifier
>> bigarray_stubs.c(1051) : error C2275: 'uintnat' : illegal use of  
>> this type as an
>> expression
>>        c:\cygwin\home\andres\ocaml-3.11.0+rc1\byterun 
>> \config.h(48) : see declar
>> ation of 'uintnat'
>> bigarray_stubs.c(1051) : error C2146: syntax error : missing ';'  
>> before identifi
>> er 'num_elts'
>> bigarray_stubs.c(1051) : error C2065: 'num_elts' : undeclared  
>> identifier
>> bigarray_stubs.c(1052) : error C2143: syntax error : missing ';'  
>> before 'type'
>> bigarray_stubs.c(1059) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(1060) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(1060) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(1062) : error C2109: subscript requires array or  
>> pointer type
>> bigarray_stubs.c(1068) : warning C4047: 'function' : 'intnat *'  
>> differs in level
>> s of indirection from 'int'
>> bigarray_stubs.c(1068) : warning C4024: 'caml_ba_alloc' : different  
>> types for fo
>> rmal and actual parameter 4
>> make[1]: *** [bigarray_stubs.obj] Error 2
>> make[1]: Leaving directory `/home/andres/ocaml-3.11.0+rc1/otherlibs/ 
>> bigarray'
>> make: *** [otherlibraries] Error 2
>>
>> andres <at> WIN-X85PMN663RN ~/ocaml-3.11.0+rc1
>> $ this fix.
>
>
>
>>
>>
>> Regards,
>>
>> - Xavier Leroy
>

_______________________________________________
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.inria.fr/bin/caml-bugs

Xavier Leroy | 26 Nov 15:34
Favicon

Re: Tutorial example for nat dynlink

Hello Yves,

> I have been trying to build a small example "hello world" program
> using native dynlink, but I don't manage to make it work.  Could
> please send me some advice?

The issue here is that when Dynlink.loadfile is called, module Toto is
not yet completely evaluated, therefore it is not yet visible to
dynamically-loaded code.  The solution is just to split your main
program in two modules: Toto containing what your plugin needs to see,
and Totomain performing the dynlink.  Then, it'll work just fine.

Cheers,

- Xavier

_______________________________________________
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.inria.fr/bin/caml-bugs


Gmane