From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10697 invoked from network); 16 Dec 1999 20:57:20 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?FekMBt5oE5Wb26f8D30G+vZBQebPGZ7g?@203.24.36.3) by ns1.primenet.com.au with SMTP; 16 Dec 1999 20:57:20 -0000 Received: (qmail 1951 invoked from network); 16 Dec 1999 20:57:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns2.primenet.com.au with SMTP; 16 Dec 1999 20:57:15 -0000 Received: (qmail 28211 invoked by alias); 16 Dec 1999 20:56:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9091 Received: (qmail 28204 invoked from network); 16 Dec 1999 20:56:03 -0000 To: zsh-workers@sunsite.auc.dk Subject: Suggestion: c library access X-Cite1: "Over 50,000 lines of code, you probably should be X-Cite2: programming in Ada." X-Cite3: -- P.J. Plaugher, Chair of the ANSI C Committee X-No-Archive: yes X-URL: http://www.stud.ifi.uio.no/~jankr/ X-Mail-Copies-To: never Original-Sender: jankr@nntp.ifi.uio.no From: Jan Kroken Date: 16 Dec 1999 21:56:01 +0100 Message-ID: X-Mailer: Gnus v5.5/Emacs 20.3 I have a suggestion for a (far) future Zsh enhancement. What if you could load libraries, and call functions from them on the command line? Imagine the following script which uses a function float pow(float,float): ---BEGIN--- #!/bin/zsh LIBM 0 $(((load-library libm))) return_function c_pow (){ Y=$(((float-to-shell $(((exec-library-function $LIBM "pow" \ $(((shell-to-float $1))) \ $(((shell-to-float $2))))))))) return Y } A=2.0 B=2.0 C=$(c_pow $A $B) $(((free-library $LIBM))) ---END--- would this be an idea? -- -jk