From owner-freebsd-questions Thu Oct 9 01:14:46 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA16580 for questions-outgoing; Thu, 9 Oct 1997 01:14:46 -0700 (PDT) (envelope-from owner-freebsd-questions) Received: from fw.dmz.dsi.unimi.it ([149.132.55.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA16571 for ; Thu, 9 Oct 1997 01:14:08 -0700 (PDT) (envelope-from mm470047@silab.dsi.unimi.it) Received: (from smap@localhost) by fw.dmz.dsi.unimi.it (8.8.5/8.8.5) id KAA24984 for ; Thu, 9 Oct 1997 10:12:54 +0200 (METDST) Received: from toe.silab.dsi.unimi.it(149.132.2.46) by fw.dmz.dsi.unimi.it via smap (V2.0beta) id xma024922; Thu, 9 Oct 97 10:12:26 +0200 Received: (from smap@localhost) by toe.silab.dsi.unimi.it (8.8.5/8.8.5) id KAA25984 for ; Thu, 9 Oct 1997 10:10:45 +0200 (METDST) Received: from tac.silab.dsi.unimi.it(149.132.2.48) by toe.silab.dsi.unimi.it via smap (V2.0beta) id xma025976; Thu, 9 Oct 97 10:10:26 +0200 Received: (from mm470047@localhost) by tac.silab.dsi.unimi.it (8.8.5/8.8.5) id KAA05104 for questions@freebsd.org; Thu, 9 Oct 1997 10:11:42 +0200 (METDST) From: Marco Molteni Message-Id: <199710090811.KAA05104@tac.silab.dsi.unimi.it> Subject: adding C code to tcl and perl To: questions@freebsd.org Date: Thu, 09 Oct 1997 10:11:42 METDST X-Mailer: Elm [revision: 112.7] Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi all, Yes, I know this isn't FreeBSD specific. But, you know, when one is so used to the high quality replies from this list... ;-) First, some background informations. I'm doing a program as a term exam for the University. It should be a smarter bookmarks manager than the standard one that comes with web browsers like Netscape. Please note that the term "smarter" comes from the project description, not from my idea of it ;-) (Also, I'm planning to release a beta version, just to know how bad it is. I'll post an announce about it asap). It is my first Unix GUI programming experience, so I started having a look at some graphical toolkits. I excluded the raw Xlib and the commercial Motif. I found a very nice toolkit, Qt from Troll tech (www.troll.no). Now I'm evaluating Qt vs tcl/tk. Tk really impressed me. Easy and, IMHO, with a language (tcl) really clean and elegant, compared to perl, which seems to me cryptic and messy (please, no religion flames). And now to the subject: adding C code to tcl and perl. Please note that I'm new to tcl (I read Ousterhout's book, and fiddled with tcl/tk a little) and I just started reading the Camel book about perl. Now correct me if I'm wrong. I'm really disappointed to see that the only way to add new commands to tcl is compiling and linking a new tclsh or a new wish, while, if I use perl, I can simply add a require or use instruction (or similar) in the script from wich I want to use a C package (I know that obviously the package or library or how you call it must be linked with the perl library). Is it true, or I'm missing something and there's an esier way to add new commands to tcl? (eg, low-level capabilities that *must* be implemented in C, and not in tcl) Thanks Marco Molteni