From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Zelphir Kaltstahl Newsgroups: gmane.lisp.guile.user Subject: Re: C programs in Scheme syntax Date: Fri, 29 May 2020 17:30:39 +0200 Message-ID: References: <87pnantoe5.fsf@fcs20.keithdiane.us> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="59419"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Icedove/60.9.0 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Fri May 29 17:31:31 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 1jegyn-000FKZ-C1 for guile-user@m.gmane-mx.org; Fri, 29 May 2020 17:31:29 +0200 Original-Received: from localhost ([::1]:42664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jegym-00057P-9K for guile-user@m.gmane-mx.org; Fri, 29 May 2020 11:31:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jegy7-0004uY-Rb for guile-user@gnu.org; Fri, 29 May 2020 11:30:47 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:35497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jegy5-0002KM-H8 for guile-user@gnu.org; Fri, 29 May 2020 11:30:47 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 36FCB16005F for ; Fri, 29 May 2020 17:30:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1590766241; bh=rORcODRYIxn4mxIWQuXq97AVV8ej+nFauzi8TC1nEHY=; h=Subject:To:From:Date:From; b=jhJfcvrEROK/VQh0ZFFNykcqE+1IfJSDZOaaQKMuW8PUpx0H1ZNnwK16REJWRPkJx PsWd1KidiX/tDHem7/AC7mojVvXgi5Id84r/lRjn4iUziPDERD40QxYdVtziXMzm/H vD4Wgchpdz1QFxxdeny5qo4Gy5Qx6SAVl04Q5KTLlpM9MA5fJaxTz2sYLRuVVBtcMT ZeuRZck0BjwLnaVEtIOcamJz6Nn/b6/ZCaCNGFEbfFJxcZoPd/3+oKa/ZSqWfgqxAo vSTzt9oI+yhKrnVEbVY4Cny8f7uwJwV8Uz8Zo9NZ/pEwinkLzif8xqluaq8OfkbmfE Ady73FepGfZjA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49YT6S4rWBz9rxT for ; Fri, 29 May 2020 17:30:40 +0200 (CEST) In-Reply-To: <87pnantoe5.fsf@fcs20.keithdiane.us> Content-Language: en-US Received-SPF: pass client-ip=185.67.36.65; envelope-from=zelphirkaltstahl@posteo.de; helo=mout01.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/29 11:30:41 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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:16531 Archived-At: Hi, There is also Schemetran: https://gitlab.com/codetk/schemetran Perhaps that was it? Regards, Zelphir On 29.05.20 05:23, Keith Wright wrote: > I am thinkging about a project that uses Scheme macros > to generate C code. To this end I want to encode C > programs as S-expressions. For example, the C program > that is encoded in Ascii as > > for (j=0;j<12;++j) a[j] = j*pi/6; > > might be encoded as an S-expression as > > (for ((= j 0)(< j 12) (++ j)) (= (sub a j)(/ (* j pi) 6))) > > Note that this is not a valid Scheme program, even with > non-standard functions defined. It is a re-encoding > of the Ascii C syntax as an S-expression. > > I think I have read about something like this, perhaps > on this list, I am not sure. (Note to future language > inventors: a single letter name makes a horrible Google > search query. Name things with made up but pronouncable > words---perl, fortran...) > > 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. > > Any pointers? > > -- Keith > >