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 KAA26388; Fri, 27 Dec 2002 10:18:43 +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 KAA26188 for ; Fri, 27 Dec 2002 10:18:42 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBR9Ien15441 for ; Fri, 27 Dec 2002 10:18:41 +0100 (MET) Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id SAA12956; Fri, 27 Dec 2002 18:18:37 +0900 (JST) To: caml-list@inria.fr, lablgtk@kaba.or.jp Subject: [Caml-list] First alpha release of LablGTK2 X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20021227181837A.garrigue@kurims.kyoto-u.ac.jp> Date: Fri, 27 Dec 2002 18:18:37 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk As promised, here is a First alpha release of LablGTK2, an interface to GTK2 GTK2 represents a new step for GTK, with full internationalization, and decent text and tree widgets (at last!) LablGTK2 is still experimental code, many new methods are not interfaced, and for the interfaced ones the API may change. However curious people may get a look at it, report bugs and make requests. What is done: * signals work (using the new calling scheme) * the new text widget is interfaced (thanks to Benjamin Monate) * conversion functions are provided to and from Utf8 (used internally by GTK2) * gdkpixbuf is included What is not done: * the new tree and list widgets are not interfaced * many methods are missing, or not accessible due to API changes * extensions (gtkgl, glade, gtkxmhtml) are not supported yet * not tested on windows (but should work with minimum effort) As usual you may find it at http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html And my best wishes for the coming year, --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG ------------------- 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 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 MAA22748; Fri, 27 Dec 2002 12:24:12 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA23217 for caml-list@pauillac.inria.fr; Fri, 27 Dec 2002 12:24:11 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA23274 for ; Fri, 27 Dec 2002 12:13:55 +0100 (MET) Received: from postfix3-2.free.fr (postfix3-2.free.fr [213.228.0.169]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id gBRBDsH05270 for ; Fri, 27 Dec 2002 12:13:54 +0100 (MET) Received: from univ-savoie.fr (grenoble-1-a7-62-147-74-187.dial.proxad.net [62.147.74.187]) by postfix3-2.free.fr (Postfix) with ESMTP id 58424C095; Fri, 27 Dec 2002 12:13:53 +0100 (CET) Message-ID: <3E0C43FE.7030200@univ-savoie.fr> Date: Fri, 27 Dec 2002 12:13:50 +0000 From: Christophe Raffalli Organization: =?ISO-8859-1?Q?Universit=E9_de_Savoie?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jacques Garrigue Cc: caml-list@inria.fr Subject: [Caml-list] about optionnal argument ? References: <20021227181837A.garrigue@kurims.kyoto-u.ac.jp> X-Enigmail-Version: 0.65.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig142BA59B03F830C33BA34117" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig142BA59B03F830C33BA34117 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit I wonder why optionnal argument are implemented through the option type instead of giving a defauklt value ? Obviously the type should carry the default value which should be a closed constant (like None, 0, 0.0, [1;2;3], etc ...) but this would preserve the possibility of using optionnal arguments and unboxed int or float arguments and it will save the None/Some test ! -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- --------------enig142BA59B03F830C33BA34117 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+DEP+SQDyWB/+xBwRAslIAJ9EBUlGmks+zWJf8qGXzFfVVjdB/QCfayTv bFIGBLSSXNUR9bfNqASgz+c= =tPfi -----END PGP SIGNATURE----- --------------enig142BA59B03F830C33BA34117-- ------------------- 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 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 QAA28625; Fri, 27 Dec 2002 16:11:32 +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 QAA28822 for ; Fri, 27 Dec 2002 16:11:32 +0100 (MET) Received: from favie.faith.gr.jp (favie.faith.gr.jp [61.127.175.250]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBRFBUn21612 for ; Fri, 27 Dec 2002 16:11:30 +0100 (MET) Received: from localhost (dhcp7.faith.gr.jp [192.168.1.17]) by favie.faith.gr.jp (8.9.3/8.9.3) with ESMTP id AAA28949; Sat, 28 Dec 2002 00:11:20 +0900 To: Christophe.Raffalli@univ-savoie.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] about optionnal argument ? In-Reply-To: <3E0C43FE.7030200@univ-savoie.fr> References: <20021227181837A.garrigue@kurims.kyoto-u.ac.jp> <3E0C43FE.7030200@univ-savoie.fr> X-Mailer: Mew version 1.94.2 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20021228001109W.garrigue@kurims.kyoto-u.ac.jp> Date: Sat, 28 Dec 2002 00:11:09 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Christophe Raffalli > I wonder why optionnal argument are implemented through the option > type instead of giving a default value ? > > Obviously the type should carry the default value which should be a closed > constant (like None, 0, 0.0, [1;2;3], etc ...) but this would preserve the > possibility of using optionnal arguments and unboxed int or float arguments > and it will save the None/Some test ! There are several reasons to use optionals rather than defaults. One is semantical: the meaning of defaults is quite clear with second-class functions, much less with first-class ones. If we want to keep an untyped semantics, your idea of putting the default in the type is not satisfactory. It would also have other implications: if I have a list of functions taking optional arguments, does it mean that they should all have the same defaults? The optional approach appears to be a nicer fit for first-class functions: it is not by chance that common lisp has the same approach. It is also more expressive: the default value may depend on the other arguments. >>From the implementation point of view, default arguments with first-class functions would be also cumbersome: either we depend strongly on types, and allow to write arbitrary values in types (not only simple ones, functions too!), or we must think of a way to put the defaults arguments in the closure when needed. Hairy. All-in-all, deriving default arguments from optionals is much simpler, and the extra cost generally doesn't matter. But you have a good point that if a function is very simple (arithmetic or data copying) and called very often, then using optionals with it is maybe not such a good idea. The overloading of glVertex is a bit of an overkill anyway. I don't know how glVertex is implemented on the C side, but if it is only copying its data to a queue, then we may want to optimize the marshalling. But again it depends how your data was layed out originally: if it is in a table, the vector form is best as no copy is needed. If you have to compute it for each call, then the flat unboxed calls are best. Regards, Jacques Garrigue ------------------- 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 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 SAA32039; Fri, 27 Dec 2002 18:37:13 +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 SAA32129 for ; Fri, 27 Dec 2002 18:37:12 +0100 (MET) Received: from dux.ru (ns.dux.ru [193.125.210.65]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBRHbBn24447 for ; Fri, 27 Dec 2002 18:37:12 +0100 (MET) Received: from dux.ru (localhost [127.0.0.1]) by dux.ru (8.12.6/8.12.6) with ESMTP id gBRHfjbc066717 for ; Fri, 27 Dec 2002 20:41:45 +0300 (MSK) (envelope-from snob@snob.spb.ru) Received: (from uucp@localhost) by dux.ru (8.12.6/8.12.1/Submit) with UUCP id gBRHfjo8066716 for caml-list@inria.fr; Fri, 27 Dec 2002 20:41:45 +0300 (MSK) (envelope-from snob@snob.spb.ru) Received: (qmail 2585 invoked by uid 0); 27 Dec 2002 17:37:06 -0000 Received: from unknown (HELO athlon.snob.spb.ru) (unknown) by unknown with SMTP; 27 Dec 2002 17:37:06 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Nickolay Semyonov-Kolchin To: caml-list@inria.fr Subject: Re: [Caml-list] about optionnal argument ? Date: Fri, 27 Dec 2002 20:18:13 +0500 User-Agent: KMail/1.4.3 References: <20021227181837A.garrigue@kurims.kyoto-u.ac.jp> <3E0C43FE.7030200@univ-savoie.fr> <20021228001109W.garrigue@kurims.kyoto-u.ac.jp> In-Reply-To: <20021228001109W.garrigue@kurims.kyoto-u.ac.jp> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200212272018.13314.snob@snob.spb.ru> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Friday 27 December 2002 20:11, Jacques Garrigue wrote: > I don't know how glVertex is implemented on the C side, but if it is > only copying its data to a queue, then we may want to optimize the > marshalling. But again it depends how your data was layed out > originally: if it is in a table, the vector form is best as no copy is > needed. If you have to compute it for each call, then the flat unboxed > calls are best. > This discussion is pointless. There will be almost no perfomance gain aft= er=20 gl[Vertex,Normal,Color,etc] call optimization. Immediate mode is slow by=20 design. One must use "Vertex Arrays" instead. VAR/VAO will give even more= =20 speedup. Nickolay ------------------- 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