home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / tcl / 1203 < prev    next >
Encoding:
Internet Message Format  |  1992-08-16  |  4.4 KB

  1. Path: sparky!uunet!mcsun!corton!sophia!bagheera.inria.fr!colas
  2. From: colas@bagheera.inria.fr (Colas Nahaboo)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: why Tk doesn't scale well
  5. Message-ID: <27073@sophia.inria.fr>
  6. Date: 16 Aug 92 12:04:16 GMT
  7. References: <1992Aug13.012211.10452@news.eng.convex.com>
  8. Sender: news@sophia.inria.fr
  9. Organization: Koala Project, Bull Research France
  10. Lines: 72
  11.  
  12. In article <1992Aug13.012211.10452@news.eng.convex.com>, connolly@convex.com
  13. (Dan Connolly) writes:
  14. |> Tcl VS SMALLTALK
  15. |> Tcl VS LISP
  16. |> I wish Tk were built on top of XLisp -- then we'd have efficient
  17. |> recursive list processing and an object system.
  18.  
  19. I agree with your post. Tcl is very nice for triggering commands, but do not
  20. scale well to actually code significant portions of the applications in it.
  21. Just in continuation of your nice analysys, I would just present my personal
  22. experiments:
  23.  
  24. In fact, even traditional lisp systems (e.g. XLisp) have the problem of
  25. converting back & forth C objects to their object representation. For instance,
  26. collections of objects in C are often reprsented by the fammiliar linear array
  27. model (argc, argv), whereas to be used in XLisp, you must convert it to linked
  28. lists.
  29. So when I set up designing Gwm, and X window manager with a built-in
  30. interpreter (call it the emacs of window managers if you want), I coded a fast
  31. lisp-like interpreter "wool" with easy integartion to C (used the same data
  32. structures as C: (argc, argv) arrays, null-terminated strings, full 32 bit
  33. numbers) and an incremental GC via refernce count (no refernece counting).
  34. At first, wool in Gwm was intended to be used like Tk: mainly like a thin
  35. glue around big C functions... but with a fast interpreter available, tons of
  36. wool code were in fact written. Try running gwm and trace (trace t) the code, 
  37. you will astounded by the amount of wool code executed routinely for managing
  38. your windows...
  39. So just like TCL is pushed beyond its limits by its users in terms of
  40. performance, wool showed its limitations for writing big amount of code in its
  41. non-standardiness and sometime exotic features, but the performance was Ok
  42. (smaller than mwm, as fast as other WMs). For instance I feel that as soon as
  43. you are going to add backslashes to create TCL programs with lines longer than
  44. 80 chars, this means you are doing too big a program for tcl...
  45.  
  46. So with this lesson, I spend some sweat making a new wool version with a
  47. common-lisp flavor, and even a small&fast CLOS object subsystem. Bull (My
  48. company) is using it in-house linked with X & Motif in its developments and we
  49. have a interactive design tool for it: egeria (not available outside of Bull
  50. yet), and it works very well. It is simpler than winterp (the class system of
  51. Xt is not mirrored int wool), but smaller and faster.
  52.  
  53. tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  54. > what is it about Tk
  55. > that makes you wish that it were built on top of XLisp?
  56.  
  57. I would too think that a more high-performance interpreter would be
  58. beneficial to Tk:
  59. 1) Xt is a bit bloated with backward compatibility issues and the design
  60.    VERY awkward at many places. Our editor egeria main problem was dealing with
  61.    these inconcistencies, using a more coherent toolkit like Tk would be a
  62.    bless for all interface-builder tools
  63. 2) TCL & Tk are very nice efforts. I, like others, although we have solutions
  64.    based on Xt and other interpreters, would like TCL and Tk to succeed as much
  65.    as possible just for the fun of it. If TCL is hampering Tk progress, a
  66.    remplacement might be considered.
  67.  
  68. PS: before anybody asks, wool v2 is not yet freely available, both by my will
  69. (I want it to be fully stable before releasing it, to avoid the problems that
  70. happened with gwm constant changes), and by some temporary constraints on
  71. diffusion that its use in a Bull commercial product implies. BUT: if you want
  72. to port Tk to wool, just mail me, we will set up things very easily!
  73.  
  74. PS2: Please don't see this a as a flame. Since I designed wool, I am perhaps a
  75. bit bised towards it :-), but TCL has advantages other it (multiple
  76. interpreters
  77. for instance, simpler operation), as have other languages other wool (xlisp,
  78. xscheme). I feel we (promoters of embedding small interpreters in applications)
  79. have the same problems, and can help each other by sharing ideas...
  80.  
  81. -- 
  82. Colas Nahaboo, colas@sa.inria.fr, Bull Research Koala proj. Wool&Gwm Architect
  83. Pho:(33) 93.65.77.70(.66 Fax), INRIA, B.P.93 - 06902 Sophia Antipolis, FRANCE.
  84.