From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA06176; Tue, 13 Feb 2001 19:08:08 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA06142 for ; Tue, 13 Feb 2001 19:08:07 +0100 (MET) Received: from tor.abc.se (ns.abc.se [195.17.72.11]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f1DI86r18762 for ; Tue, 13 Feb 2001 19:08:06 +0100 (MET) Received: from gateway (dialup-29 [195.17.73.29]) by tor.abc.se (8.9.3+Sun/8.9.3) with SMTP id TAA17866; Tue, 13 Feb 2001 19:07:35 +0100 (MET) From: "Mattias Waldau" To: "Vijay Chakravarthy" , , "'Chris Hecker'" Cc: Subject: RE: [Caml-list] Re: OCaml for Windows: a suggestion Date: Tue, 13 Feb 2001 19:07:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal In-Reply-To: <003f01c0969b$5e11b550$d3d4fc9e@SFOWVCHAK1L7> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk The problem that many of the extra code written for Ocaml don't work in the Windows version was my reason to convert to cygwin. Also, that ocamldebug works is a real bonus. Currently it is a big pain trying to compile packages like PXP for windows, even if you normally succeed after a while. I don't really know how to solve this problem, but one solution could be to have more packages precompiled for windows, for example pxp, lablgtk (incl necessary dlls)..... Until we do that, doing serious developing on a windows platform is hard. /mattias -----Original Message----- From: owner-caml-list@pauillac.inria.fr [mailto:owner-caml-list@pauillac.inria.fr]On Behalf Of Vijay Chakravarthy Sent: Wednesday, February 14, 2001 4:33 PM To: lionel.fourquaux@wanadoo.fr; 'Chris Hecker' Cc: caml-list@inria.fr Subject: [Caml-list] Re: OCaml for Windows: a suggestion While we are on this topic, some observations (trying to coordinate my windows based Ocaml development with the rest of my team (they use Linux, I have a laptop and use Win2000)) that can be considered feedback: 1. findlib etc dont work on windows, and there is enough of a difference between make and nmake that most make scripts break. That causes a bunch of packages to be difficult to build under windows (difficult enough to put off novice programmers that I'm trying to get hooked on Ocaml) 2. I guess 1. stems from dbm not being available on windows. Would it be difficult to have an interface to Sleepycat's version on windows, and make that part of the standard distrib? 3. Since fork() doesnt work on windows, I cant use most of the web-server type stuff written in Ocaml. It would be nice to have a (medusa,thttpd,zeus) style single threaded web-server based on equeues. It would also rock -- performance wise (upto a certain number of users I guess) Vijay ----- Original Message ----- From: "Lionel Fourquaux" To: "'Chris Hecker'" Cc: Sent: Monday, February 12, 2001 1:27 PM Subject: RE: OCaml for Windows: a suggestion > -----Message d'origine----- > De : Chris Hecker [mailto:checker@d6.com] > Envoyé : lundi 12 février 2001 20:38 > À : Xavier Leroy; Jean Martos > Cc : lionel.fourquaux@wanadoo.fr; caml-list@inria.fr > Objet : Re: OCaml for Windows: a suggestion > > > > A couple of suggestions were made for the Windows OCaml port. > I disagree with both. I'll get to the details in a moment. > > First, it's important to know what your goals are. Is the > goal to make OCaml more widely used for production code on > Win32? That would be my goal if I were running the OCaml > project. Is the goal to make it more "open source" and less > dependent on commercial software? That's a fine goal as > well, but it conflicts in some ways with the former goal. Well, since I'm not a professional programmer, I don't qualify to discuss this. My goal when I wrote this suggestion was to point out changes that are IMHO good for the future development of ocaml for windows. (I don't see how to support dynamic loading of native code without this.) > > 1. making the port a gcc port rather than an msvc port > > The reality of the situation is that almost all production > programmers on Win32 platforms use msvc. Moving the port to > a gcc variant would just make it even harder for those people > to try out ocaml if they ever want to build the compiler. It > will also have a perception problem with professional > programmers, who don't take gcc on Win32 very seriously (for > lots of good reasons). And finally, if the port is done in > such a way that a standalone runtime ocaml .exe cannot be > produced that doesn't depend on cygwin or other nonstandard > dlls, it would be a complete disaster and would forever > relegate ocaml to research work. I think you are right. However, note that Mingw32 doesn't depend on nonstandard dlls, and produces code that is compatible with msvc. > > 2. moving most of the runtime code into DLLs > > This would be fine as an option, but there has to be a way to > make a standalone exe that only depends on default installed > Win32 dlls (user32.dll, kernel32.dll, advapi32.dll, > ws2_32.dll, etc.). If I have to send a bunch of dlls along > with my exe for anybody to use my program then I'm _MUCH_ > less likely to use ocaml for anything real. It just > increases my support burden. I'm actually dealing with this > right now. I want to use ocaml for doing a small OpenGL > program, but both available graphics libraries (LablTk and > LablGtk) require a bunch of other dlls and installation. > It's making me think twice about using ocaml for this > program, because I either have to tell people to install > those packages, or I have to write my own quick Win32 layer > (hopefully if I choose this path I can use the Togl code and > I won't have to wrap OpenGL manually). I was thinking of one standard ocaml dll (something like "ocamlrun.dll"), that would be shared by all ocaml executables. Is it really a burden? > > > My suggestions are the following, in order of importance for > the first goal above (to make OCaml more likely to be used by > professional Win32 programmers for real programs): > > 1. Overloading. Yes, I know, not a Win32 feature. > 2. Module recursion. Ditto. > 3. Generics. Ditto again. > > 4. A Win32 programming interface, possibly auto-generated > from winuser, wingdi, winbase, etc. I am a huge fan of cross > platform development, but it's important to face facts here: > none of the cross platform gui libraries are ready for real > production work in the competitive Win32 commericial software > industry. I'm sure people will argue with this and say "our > company shipped SuperMoleculeViz on Solaris with Tk and it > was great!" This is not the same thing. Those libraries are > a long way from letting me do an interface that's as tight > and professional (notice I didn't say good :) as one of the > Office apps, or any other professional Win32 app. I do not > think anybody has to spend years trying to make a beautiful > OO encapsulation of Win32 (as if such a thing was possible), > nor do they have to mimic the heinosity that is MFC. Just > allow me to write a Win32 app in all its platform-specific > glory if I want to. This probably means we need to make sure > you can include resource files (I wonder, would the resource > compiler just work on an ocaml .exe? hmm...). If I could > show people tight applications that act just like ones > written in C to the Win32 API, this would be a powerful thing. It wouldn't be easy, would it? > > 5. Make dynalinking to ocaml dlls work. We have to solve > the dynalink problem at some point. Large applications need > plugins and other modularity type features, and loading ocaml > code in DLLs is important. It would be nice if this worked > in every direction (ocaml exe - c dll, ocaml exe - ocaml dll, > c exe - ocaml dll). This point is very important. If you want this, I don't see how to avoid using the ocaml dll I proposed: you don't want one gc per dll, do you? > > 6. More x86 code generation optimizations. A peephole > optimizer would be great for part of this. There's just a > lot of register sloshing that's unnecessary in the code I've > looked at. It seems within reach to get identical loops in C > and OCaml the same speed. Not a big deal but I thought I'd > throw it in there. > > I'm sure there's more, but that would be a start. :) Well, it looks like a lot of work for the Consortium ! > > Chris > Lionel Fourquaux ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr