From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id F1E15BC6C for ; Fri, 18 Jan 2008 06:33:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FANvIj0dDWxLC/2dsb2JhbACBV5ARnAQ X-IronPort-AV: E=Sophos;i="4.25,214,1199660400"; d="scan'208";a="8028437" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Jan 2008 06:33:39 +0100 Received: from kuba.bertec.net (kuba.bertec.net [192.168.2.16]) by server1.bertec.net (Postfix) with ESMTP id 45C99CDF92 for ; Fri, 18 Jan 2008 00:33:39 -0500 (EST) From: Kuba Ober To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: Hash clash in polymorphic variants Date: Fri, 18 Jan 2008 00:33:38 -0500 User-Agent: KMail/1.9.6 (enterprise 0.20071204.744707) References: <200801140956.25449.ober.14@osu.edu> <1200424809.2564.95.camel@flake.lan.gerd-stolpmann.de> <200801152204.45376.jon@ffconsultancy.com> In-Reply-To: <200801152204.45376.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801180033.38244.ober.14@osu.edu> X-Spam: no; 0.00; hash:01 variants:01 gerd:01 stolpmann:01 guis:01 ocaml:01 rewrites:01 ocaml:01 rewriting:01 guis:01 ocaml's:01 vastly:01 lablgtk:01 lablgtk:01 parallelism:01 On Tuesday 15 January 2008, Jon Harrop wrote: > On Tuesday 15 January 2008 19:20:09 Gerd Stolpmann wrote: > > Jon Harrop wrote: > > > Incidentally, Xavier made a statement based upon what appears to me to > > > be a similar logical error in the CUFP notes from last year that I read > > > recently: > > > > > > "On the other hand, certain features seem somewhat unsurprisingly to > > > be unimportant to industrial users. GUI toolkits are not an issue, > > > because GUIs tend to be built using more mainstream tools; it seems > > > that different competencies are involved in Caml and GUI development > > > and companies "don't want to squander their precious Caml expertise > > > aligning pixels". Rich libraries don't seem to matter in general; > > > presumably companies are happy to develop these in-house. And no-one > > > wants yet another IDE; the applications of interest are usually built > > > using a variety of languages and tools anyway, so consistency of > > > development environment is a lost cause." > > > - http://cufp.galois.com/CUFP-2007-Report.pdf (page 3) > > > > An interesting thesis, right? Although I wouldn't get that far, there is > > some truth in it. The point, IMHO, is that OCaml will never replace > > other languages in the sense that a company who uses language X for > > years in product Y rewrites the code in OCaml. For what reason? The > > company would run into big educational problems (learning a new > > environment), would have high initial costs, and it is questionable > > whether the result is better. Of course, for rewriting existing software > > the company would profit from GUIs, from rich libraries etc. But I think > > this does not happen. > > I believe many more companies would migrate to OCaml if it had > well-documented GUI APIs and rich libraries. Indeed, Microsoft are gambling > on people migrating to F# in exactly the same way. > > > What I see, however, is that OCaml is used where new software is > > developed, in ambitious projects that start from scratch. It is simply a > > fact that GUIs are not crucial in these areas (at least for the > > companies I know). > > But the companies you know were already self-selected to be the ones who do > not care about OCaml's limitations, so it is a biased sample? > > > GUIs are seen as standard tools where nothing new happens where OCaml > > could shine. > > I have no doubt that OCaml would shine in GUIs just as it does elsewhere. > > > If you need one, you develop it in one of the mainstream languages. > > Actually I would either choose F# on Windows or give up on any other OS. > > > IDEs aren't interesting right now because OCaml is mainly used by > > (computer & related) scientists (and I include scientists working for > > companies outside academia). > > Many of the world's most sophisticated IDEs are targetted solely at > technical users. Look at Mathematica's notebook interface, for example. I > believe that is a great example to aspire to. > > > IDEs are nice for beginners and for people > > who do not want to know what's happening inside. They are not > > interesting for companies that invent completely new types of products, > > because they've hired experts that can live without (and want to live > > without). > > I couldn't disagree more. Pharmaceuticals are a trillion dollar industry > where many scientists would benefit enormously from being able to use a > tool like OCaml without knowing anything about how it works in order to > create their next generation products (drugs). The same is true of most > industries where scientists and engineers work and there are many such > industries and there are extremely profitable. > > > > Xavier appears to have taken the biased sample of industrialists who > > > already use OCaml despite its limitations and has drawn the conclusion > > > that these limitations are not important to industrialists. I was > > > really horrified to see this because, in my experience, companies are > > > turning away from OCaml in droves because of exactly the limitations > > > Xavier enumerated and I for one would dearly love to see them fixed. > > > > Which companies? > > General Electric, Microsoft, Wolfram Research and various bioinformatics > institutes for example. > > Look at General Electric. They build some of the world's most sophisticated > medical scanners and that large-scale embedded market is ideal for using > languages like OCaml for its high-performance numerics because you have > complete control over the environment. However, they desperately need GUI > toolkits to provide a front-end for users. > > I'd like to know what Alex Barretta makes of this, for example. His glass > cutters must have the same characteristics in this respect... > > > I fully understand that OCaml is not well-suited for the average > > company. But it is not because of missing GUIs and IDEs, but because the > > language itself is too ambitious. Sorry to say that, but this is not the > > mainstream and it will never be. > > I still think OCaml has the best chance of any FPL to become a mainstream > tool in technical computing. > > Indeed, I recently tried to quantify how far OCaml has already come and I > believe it is already as popular as C# among technical users, for example. > That is quite an achievement! > > > (I have a good friend who works for an average company, so I know what > > I'm talking of. They program business apps for a commercial platform > > from CA. A horrible language, but they can manage it. They are experts > > for the models they use, and simply take a platform from industry.) > > Yes. I do not believe OCaml will make significant inroads into displacing > COBOL and relatives but there are a lot of other big opportunities out > there for such a language. > > > > OCaml will continue to go from strength to strength regardless but its > > > uptake would be vastly faster if these problems are addressed. To take > > > them point by point: > > > > > > . GUIs are incredibly important (LablGTK is the world's favorite OCaml > > > library!) and tens of thousands of OCaml programmers are crying out for > > > proper LablGTK documentation as a first priority, many of whom are in > > > industry. > > > > See this as opportunity for your next book :-) > > Indeed. Even after the announcement that Microsoft are productizing F#, > OCaml for Scientists continues to be our biggest earning product. > Consequently, I am very tempted to write a "sequel" that covers many of the > important aspects of the language that I did not cover in the original, > including GUI programming, XML, parallelism and so forth. If anyone has > ideas for subjects they would like to see covered, please e-mail me! > > > GTK is already poorly documented, so this is not only the problem of the > > LablGTK creators. Nevertheless, GTK is widely used. I don't think it's a > > real problem. > > Yes. I'm really not sure what the best course of action would be here. > Would Qt bindings be preferable? Is it worth the hassle? How long would it > be before they reached the maturity of GTK? Making bindings for Qt is basically putting a beautiful architecture to waste. Qt's architecture is good enough to be actually machine-translated into OCaml. This would be an involved project, but not impossible. Using Qt from OCaml via a set of bindings can be a short-term stop-gap measure for trivial applications, I would never deploy a Qt application written in OCaml if the application was any bigger on the GUI side than a couple simple dialog boxes. There is a binding generator (forgot its name) which can generate OCaml bindings for Qt, but you have to give it a list of classes/methods/signals/slots to generate bindings for. So perfect for trivial applications, but not much else. Qt, when you start to think of its API in how it may look in OCaml, becomes pretty cool, and I'm sure there are a few improvements to it you can make to leverage the power given to you by OCaml, once you loose the shackles of C++. Cheers, Kuba