* [Caml-list] ocamldot on steroids @ 2002-07-18 8:47 Brian Naylor 2002-07-18 8:54 ` Maxence Guesdon 0 siblings, 1 reply; 11+ messages in thread From: Brian Naylor @ 2002-07-18 8:47 UTC (permalink / raw) To: caml-list Ocamldot is a useful tool, showing the dependency relationship between compilation units. Has anyone given thought to creating a kind of "super ocamldot" which shows the dependency relationships between modules, functors, module types, and compilation units? __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] ocamldot on steroids 2002-07-18 8:47 [Caml-list] ocamldot on steroids Brian Naylor @ 2002-07-18 8:54 ` Maxence Guesdon 2002-07-18 14:45 ` [Caml-list] Looking for sample DLL Mattias Waldau 2002-07-18 17:02 ` [Caml-list] ocamldot on steroids Brian Naylor 0 siblings, 2 replies; 11+ messages in thread From: Maxence Guesdon @ 2002-07-18 8:54 UTC (permalink / raw) To: Brian Naylor; +Cc: caml-list > Ocamldot is a useful tool, showing the dependency relationship between > compilation units. Has anyone given thought to creating a kind of "super > ocamldot" which shows the dependency relationships between modules, functors, > module types, and compilation units? OCamldoc, in OCaml 3.05, will come with a dot generator which can output dot graphs for modules dependencies or types dependencies, with some additionnal fancy colors. You can already try it from the CVS. More graphs could be created, indeed. -- Maxence Guesdon ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Caml-list] Looking for sample DLL 2002-07-18 8:54 ` Maxence Guesdon @ 2002-07-18 14:45 ` Mattias Waldau 2002-07-19 3:53 ` Dmitry Bely 2002-07-18 17:02 ` [Caml-list] ocamldot on steroids Brian Naylor 1 sibling, 1 reply; 11+ messages in thread From: Mattias Waldau @ 2002-07-18 14:45 UTC (permalink / raw) To: caml-list I need to create an old traditional Windows-DLL (not a COM-DLL) and I am looking for a sample. Any out there? /mattias ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Looking for sample DLL 2002-07-18 14:45 ` [Caml-list] Looking for sample DLL Mattias Waldau @ 2002-07-19 3:53 ` Dmitry Bely 2002-07-19 6:10 ` Mattias Waldau 0 siblings, 1 reply; 11+ messages in thread From: Dmitry Bely @ 2002-07-19 3:53 UTC (permalink / raw) To: caml-list "Mattias Waldau" <mattias.waldau@abc.se> writes: > I need to create an old traditional Windows-DLL (not a COM-DLL) and > I am looking for a sample. How are you going to use it - Caml DLL/Caml EXE, Caml DLL/C EXE or something else? And why COM is not acceptable? Do you know that you can use COM DLL without registering like a traditional one, calling LoadLibrary() and DllGetClassObject() manually? In fact COM is just a convenient interface specification... Dmitry Bely ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [Caml-list] Looking for sample DLL 2002-07-19 3:53 ` Dmitry Bely @ 2002-07-19 6:10 ` Mattias Waldau 2002-07-19 20:17 ` Dmitry Bely 0 siblings, 1 reply; 11+ messages in thread From: Mattias Waldau @ 2002-07-19 6:10 UTC (permalink / raw) To: 'Dmitry Bely', caml-list I have a big caml-program that I would like to call from VB/VBA. I prefer DLL to COM, since I do not need to register. Also, VBA cannot call normal COM-objects, they need the idispatch-interface. /mattias > -----Original Message----- > From: owner-caml-list@pauillac.inria.fr > [mailto:owner-caml-list@pauillac.inria.fr] On Behalf Of Dmitry Bely > Sent: Friday, July 19, 2002 5:53 AM > To: caml-list@inria.fr > Subject: Re: [Caml-list] Looking for sample DLL > > > "Mattias Waldau" <mattias.waldau@abc.se> writes: > > > I need to create an old traditional Windows-DLL (not a COM-DLL) and > > I am looking for a sample. > > How are you going to use it - Caml DLL/Caml EXE, Caml DLL/C > EXE or something else? And why COM is not acceptable? Do you > know that you can use COM DLL without registering like a > traditional one, calling LoadLibrary() and > DllGetClassObject() manually? In fact COM is just a > convenient interface specification... > > Dmitry Bely > > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Looking for sample DLL 2002-07-19 6:10 ` Mattias Waldau @ 2002-07-19 20:17 ` Dmitry Bely 2002-07-19 21:16 ` Mattias Waldau 0 siblings, 1 reply; 11+ messages in thread From: Dmitry Bely @ 2002-07-19 20:17 UTC (permalink / raw) To: Mattias Waldau; +Cc: caml-list "Mattias Waldau" <mattias.waldau@abc.se> writes: > I have a big caml-program that I would like to call from VB/VBA. Then COM is obviously your choice. How else will you interface VB with your Ocaml library? > I prefer DLL to COM, I cannot understand this. DLL and COM are not concepts of the same level. That's like to say "I prefer fruits to oranges" :-) > since I do not need to register. I have already explaned you that in fact you can use COM DLL without registering, at least from C/C++ (don't know about VB since I never used it). > Also, VBA > cannot call normal COM-objects, they need the idispatch-interface. Not a problem. Camlidl lets you to equip Ocaml COM component with IDispatch interface. Dmitry Bely ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: [Caml-list] Looking for sample DLL 2002-07-19 20:17 ` Dmitry Bely @ 2002-07-19 21:16 ` Mattias Waldau 2002-07-21 8:12 ` Dmitry Bely 0 siblings, 1 reply; 11+ messages in thread From: Mattias Waldau @ 2002-07-19 21:16 UTC (permalink / raw) To: 'Dmitry Bely'; +Cc: caml-list The reason I was looking for a sample is that it will take me probably a couple of days just getting the makefile right etc. Therefor, much easier to just take someone else code and tweak it a little. > I cannot understand this. DLL and COM are not concepts of the > same level. That's like to say "I prefer fruits to oranges" :-) COM's are implemented as a DLL, I have been unclear. What I need is to be able using the old win16/32 dll-calling convention, not using the modern COM-convention. The reason is that VBA doesn't support the COM supported by camlidl, it only supports IDISPATCH. (I made some COM-stuff in my life, but I do not like it, especially if you need to use C++. Now at last in dotnet seems Microsoft gotten it right without wizards that creates enormous amounts of code I don't understand.) I would like to keep it as simple as possible, thus the dll-calling convention is enough. I will only call a few functions and I only need to return integers. (Thus no need to mess with BSTR, which would be needed if I would return strings from ocaml to vb). /mattias ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] Looking for sample DLL 2002-07-19 21:16 ` Mattias Waldau @ 2002-07-21 8:12 ` Dmitry Bely 0 siblings, 0 replies; 11+ messages in thread From: Dmitry Bely @ 2002-07-21 8:12 UTC (permalink / raw) To: Mattias Waldau; +Cc: 'Dmitry Bely', caml-list "Mattias Waldau" <mattias.waldau@abc.se> writes: > The reason I was looking for a sample is that it will take me > probably a couple of days just getting the makefile right etc. > Therefor, much easier to just take someone else code and tweak > it a little. Well, look into camlidl runtime. In fact, all you need is extern "C" BOOL APIENTRY DllMain(HANDLE module, DWORD reason, void *reserved) { char * argv[2]; char dll_path[_MAX_PATH]; switch(reason) { case DLL_PROCESS_ATTACH: GetModuleFileName( (HMODULE) module, dll_path, _MAX_PATH ); argv[0] = dll_path; argv[1] = NULL; camlidl_module_handle = (HMODULE) module; #if 0 int fd = open("/tmp/camllog", O_RDWR|O_TRUNC|O_CREAT, _S_IWRITE|_S_IREAD); dup2(fd, 1); dup2(fd, 2); close(fd); #endif caml_startup(argv); break; /* TODO: free all memory when DLL detached */ } return TRUE; } and an appropriate Makefile. You can also easily modify camlidldll script, removing all COM-related stuff from there. >> I cannot understand this. DLL and COM are not concepts of the >> same level. That's like to say "I prefer fruits to oranges" :-) > > COM's are implemented as a DLL, I have been unclear. What I need > is to be able using the old win16/32 dll-calling convention, not > using the modern COM-convention. > > The reason is that VBA doesn't support the COM supported by camlidl, > it only supports IDISPATCH. But once again, IDISPATCH is *supported* by camlidl. Why not to create IDispatch-equipped Ocaml COM component? > (I made some COM-stuff in my life, but > I do not like it, especially if you need to use C++. Now at last > in dotnet seems Microsoft gotten it right without wizards that > creates enormous amounts of code I don't understand.) For VB and OCaml, no wizard-generated code is necessary, just normal C stubs and virtual method tables plus type libraries, generated by MIDL. > I would like to keep it as simple as possible, thus the dll-calling > convention is enough. I will only call a few functions and I only > need to return integers. (Thus no need to mess with BSTR, which > would be needed if I would return strings from ocaml to vb). - Dmitry Bely ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] ocamldot on steroids 2002-07-18 8:54 ` Maxence Guesdon 2002-07-18 14:45 ` [Caml-list] Looking for sample DLL Mattias Waldau @ 2002-07-18 17:02 ` Brian Naylor 2002-07-18 18:45 ` Emmanuel Renieris 2002-07-19 8:39 ` Maxence Guesdon 1 sibling, 2 replies; 11+ messages in thread From: Brian Naylor @ 2002-07-18 17:02 UTC (permalink / raw) To: caml-list This looks pretty good - though the types output is so small as to be unreadable. Any hints on getting the output (especially for types) to use multiple pages - I tried feeding it smaller sections of the code but then it complains of missing types. I should say that I used the following sequence of commands: ocamldoc -o types.dot -dot -dot-types -dot-reduce $(SOURCES) dot -Tps types.dot > types.ps Maybe there is a different renderer other than "dot"? It seems as if any large program will have this problem. What do you use to examine/print the results? > dot graphs for modules dependencies or types dependencies, with some __________________________________________________ Do You Yahoo!? Yahoo! Autos - Get free new car price quotes http://autos.yahoo.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] ocamldot on steroids 2002-07-18 17:02 ` [Caml-list] ocamldot on steroids Brian Naylor @ 2002-07-18 18:45 ` Emmanuel Renieris 2002-07-19 8:39 ` Maxence Guesdon 1 sibling, 0 replies; 11+ messages in thread From: Emmanuel Renieris @ 2002-07-18 18:45 UTC (permalink / raw) To: Brian Naylor; +Cc: caml-list The other tool I use to look at things is "dotty", but there is a tcl version (tcldot:not as good, but maybe easier to customize) and a Java version (Grappa?). Also, dot can take any number of parameters, some inside and some outside its input file, to set width, height, aspect ratio, etc. Look at graphviz.org, and the corresponding AT&T site (linked to from there). Also look at http://www.research.att.com/~north/graphviz/ -- Manos On Thu, Jul 18, 2002 at 10:02:43AM -0700, Brian Naylor wrote: > This looks pretty good - though the types output is so small as to be > unreadable. Any hints on getting the output (especially for types) to use > multiple pages - I tried feeding it smaller sections of the code but then it > complains of missing types. > > I should say that I used the following sequence of commands: > > ocamldoc -o types.dot -dot -dot-types -dot-reduce $(SOURCES) > dot -Tps types.dot > types.ps > > Maybe there is a different renderer other than "dot"? It seems as if any large > program will have this problem. What do you use to examine/print the results? > > > dot graphs for modules dependencies or types dependencies, with some > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Autos - Get free new car price quotes > http://autos.yahoo.com > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Caml-list] ocamldot on steroids 2002-07-18 17:02 ` [Caml-list] ocamldot on steroids Brian Naylor 2002-07-18 18:45 ` Emmanuel Renieris @ 2002-07-19 8:39 ` Maxence Guesdon 1 sibling, 0 replies; 11+ messages in thread From: Maxence Guesdon @ 2002-07-19 8:39 UTC (permalink / raw) To: Brian Naylor; +Cc: caml-list > This looks pretty good - though the types output is so small as to be > unreadable. Any hints on getting the output (especially for types) to use > multiple pages - I tried feeding it smaller sections of the code but then it > complains of missing types. > > I should say that I used the following sequence of commands: > > ocamldoc -o types.dot -dot -dot-types -dot-reduce $(SOURCES) > dot -Tps types.dot > types.ps I usually change some options in the generated dot code, to change the number of pages, etc ... i should add some options to ocamldoc to generate dot code with the values of the user for the following options: size, ratio, page, so i can compete for the tool with the longest list of options :-) Check the documentation of dot: http://www.research.att.com/~erg/graphviz/info/attrs.html#d:ratio > Maybe there is a different renderer other than "dot"? It seems as if any large > program will have this problem. What do you use to examine/print the results? I use the options mentioned above, a ggod printer, some adhesive and i sit in the middle of the resulting 4meters x 4meters sheet, a litte lost in all these dependencies :-) -- Maxence Guesdon ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-07-21 8:15 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-07-18 8:47 [Caml-list] ocamldot on steroids Brian Naylor 2002-07-18 8:54 ` Maxence Guesdon 2002-07-18 14:45 ` [Caml-list] Looking for sample DLL Mattias Waldau 2002-07-19 3:53 ` Dmitry Bely 2002-07-19 6:10 ` Mattias Waldau 2002-07-19 20:17 ` Dmitry Bely 2002-07-19 21:16 ` Mattias Waldau 2002-07-21 8:12 ` Dmitry Bely 2002-07-18 17:02 ` [Caml-list] ocamldot on steroids Brian Naylor 2002-07-18 18:45 ` Emmanuel Renieris 2002-07-19 8:39 ` Maxence Guesdon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox