From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.user,gmane.lisp.guile.devel Subject: Re: Doc organization (Re: Around again, and docs lead role) Date: Thu, 08 May 2003 21:23:49 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <87isskq2mi.fsf@raven.i.defaultvalue.org> References: <3E92E1B4002B0632@pop3.tiscalinet.es> <3EAFE4EC000D9733@pop1.tiscalinet.es> <87d6its93b.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052447059 32040 80.91.224.249 (9 May 2003 02:24:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 9 May 2003 02:24:19 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri May 09 04:24:17 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19DxY0-0008JW-00 for ; Fri, 09 May 2003 04:23:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DxZ3-0004ls-05 for guile-user@m.gmane.org; Thu, 08 May 2003 22:24:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19DxYR-0004ET-00 for guile-user@gnu.org; Thu, 08 May 2003 22:24:11 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19DxYN-00043G-00 for guile-user@gnu.org; Thu, 08 May 2003 22:24:08 -0400 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19DxY6-0003L4-00; Thu, 08 May 2003 22:23:50 -0400 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 9C73C8D3; Thu, 8 May 2003 21:23:49 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 75A962150F7; Thu, 8 May 2003 21:23:49 -0500 (CDT) Original-To: Neil Jerram In-Reply-To: (Neil Jerram's message of "08 May 2003 23:36:44 +0100") User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) Original-cc: guile-user@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: General Guile related discussions List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:1924 gmane.lisp.guile.devel:2301 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2301 Neil Jerram writes: > To me, if defeats the whole object of Guile if catering for this case > means that it is harder to improve Guile and its docs for the other > 99% of cases. To avoid this happening, I suggest that we could solve > this problem by a mechanism that links Scheme code into a library or > executable at build time. This could be something like unexec (in > which case the source would already have been read and stored in tree > code), or it could be a linker tool that just dumps plain source code > into the binary - as though it was a big const char[], but more > convenient to use at build time. That could be interesting. To some extent how we decide to handle compilation will factor in here. If you thought large static scm fragments, were likely to be common, I guess one thing that might make hacking easier would be an easy way to do something equivalent to #include , i.e. a way you could hack the scheme part as a scheme file, but then have the code end up incorporated in and evaled by the .so file. Of course I guess anyone could hack something like that up if they needed to with a makefile and appropriate use of "cat"... Actually, I've been playing around with code that would make something like this possible (as a dumb example): (define (double x) (c-syntax (if ("SCM_INUMP" x) (return (* x x)) (return ("scm_apply" ("scm_lookup" "+") x x))))) and that already works for (%function "main" int ((int argc) ((%array (* char)) argv)) ("printf" "Hello world\\n")) etc. (i.e. a C s-expression representation), but I'm not sure how likely it is that anyone else would find it amusing. I can think of a few possible uses for such a construction (g-wrap, auto-ffi, "c-side"-macros, scm-to-C-compiler-back-end, c equiv of inline-asm), but I'm still not sure it's really worthwhile. I might comment more later if I remain intrigued... > Embedded Scheme is OK for small code fragments, otherwise as just > suggested above. As far as dynamic content is concerned, is there any > kind of dynamic Scheme content that can't be generated and then eval'd > by a chunk of static Scheme code? (I don't think so, if it could be > generated by a chunk of static C code.) Not sure. As long as you're not limited to eval_str -- i.e. as long as you have eval_form, then perhaps not. > Absolutely. I think that data substructure manipulation functions > like scm_cons, SCM_CAR and SCM_CDR, should be included in the > documented C API. Sure, but I was wondering what else might be needed. Of course I'm not sure I have a clear idea of what kind of things might be omitted... > Now that I've been involved for some time, I'm pretty sure that any > extra work will be insignificant compared to the long term cost of not > having the right overall focus and structure. So I wouldn't worry > about the work yet. Focus is good. -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user