From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Jan Wedekind Newsgroups: gmane.lisp.guile.user Subject: Re: C programs in Scheme syntax Date: Fri, 29 May 2020 21:01:18 +0100 Message-ID: References: <87pnantoe5.fsf@fcs20.keithdiane.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="85597"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri May 29 22:01:42 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jelCI-000MA8-Hx for guile-user@m.gmane-mx.org; Fri, 29 May 2020 22:01:42 +0200 Original-Received: from localhost ([::1]:56134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jelCH-0000Vt-Kj for guile-user@m.gmane-mx.org; Fri, 29 May 2020 16:01:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jelC4-0000TS-K8 for guile-user@gnu.org; Fri, 29 May 2020 16:01:28 -0400 Original-Received: from wp424.webpack.hosteurope.de ([2a01:488:42:1000:50ed:85c1::]:50990) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jelC2-0001lF-UF for guile-user@gnu.org; Fri, 29 May 2020 16:01:28 -0400 Original-Received: from host86-170-206-137.range86-170.btcentralplus.com ([86.170.206.137] helo=[192.168.1.209]); authenticated by wp424.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1jelBx-0007q2-Aq; Fri, 29 May 2020 22:01:21 +0200 In-Reply-To: <87pnantoe5.fsf@fcs20.keithdiane.us> X-bounce-key: webpack.hosteurope.de;jan@wedesoft.de;1590782486;bd51d312; X-HE-SMSGID: 1jelBx-0007q2-Aq Received-SPF: none client-ip=2a01:488:42:1000:50ed:85c1::; envelope-from=jan@wedesoft.de; helo=wp424.webpack.hosteurope.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/29 16:01:21 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16534 Archived-At: I have implemented a GNU Guile extension which compiles array operations to= machine code using LLVM: http://wedesoft=2Egithub=2Eio/aiscm/ I thought you might be interested since your example is an array operation= =2E Regards Jan Am 29=2E Mai 2020 04:23:46 GMT+01:00 schrieb Keith Wright : >I am thinkging about a project that uses Scheme macros >to generate C code=2E To this end I want to encode C=20 >programs as S-expressions=2E For example, the C program >that is encoded in Ascii as > >for (j=3D0;j<12;++j) a[j] =3D j*pi/6; > >might be encoded as an S-expression as > >(for ((=3D j 0)(< j 12) (++ j)) (=3D (sub a j)(/ (* j pi) 6))) > >Note that this is not a valid Scheme program, even with >non-standard functions defined=2E It is a re-encoding >of the Ascii C syntax as an S-expression=2E > >I think I have read about something like this, perhaps >on this list, I am not sure=2E (Note to future language >inventors: a single letter name makes a horrible Google >search query=2E Name things with made up but pronouncable >words---perl, fortran=2E=2E=2E) > >I most need to convert S-expr encoded C, to Ascii encoded C, >but I am interested in >(a) programs to convert S-expresions to C >(b) specifications for the form of the S-expr encoding >(c) better plans; advice from those who have tried and failed=2E > >Any pointers? > > -- Keith --=20 Diese Nachricht wurde von meinem Android-Ger=C3=A4t mit K-9 Mail gesendet= =2E