From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Todor_Kondi=C4=87?= Newsgroups: gmane.lisp.guile.user Subject: Re: C programs in Scheme syntax Date: Sat, 30 May 2020 10:13:22 +0000 Message-ID: References: <87pnantoe5.fsf@fcs20.keithdiane.us> Reply-To: =?UTF-8?Q?Todor_Kondi=C4=87?= 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="7039"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "guile-user@gnu.org" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sat May 30 12:13:53 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 1jeyUy-0001hb-IA for guile-user@m.gmane-mx.org; Sat, 30 May 2020 12:13:52 +0200 Original-Received: from localhost ([::1]:55612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeyUx-0003uY-1U for guile-user@m.gmane-mx.org; Sat, 30 May 2020 06:13:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeyUo-0003uR-5M for guile-user@gnu.org; Sat, 30 May 2020 06:13:42 -0400 Original-Received: from mail2.protonmail.ch ([185.70.40.22]:36151) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeyUm-0004KG-IJ for guile-user@gnu.org; Sat, 30 May 2020 06:13:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1590833610; bh=FmMXntHj8MLMqoSQJv/5Hh25Dcsuu/4TTtBI9T85SEE=; h=Date:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=mkoC/IlTJfUfwvlElnXFdyth6qmnu3aPKpnDMmi7ke4tTjRP2Np0AevAYBAawBwbH d6Op+E/DELF4zzpgTwnbnMjUCQkUnfT/IWb4snQXHFPt9oiuuQWlOLdencuPHdYFaT Q6tQ8/IrXCVfR3rJo8EhShOUDCQpV8KMkzF0gOko= In-Reply-To: Received-SPF: pass client-ip=185.70.40.22; envelope-from=tk.code@protonmail.com; helo=mail2.protonmail.ch X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/30 06:13:30 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:16536 Archived-At: > I have implemented a GNU Guile extension which compiles array operations = to machine code using LLVM: http://wedesoft.github.io/aiscm/ > I thought you might be interested since your example is an array operatio= n. > > Regards > Jan > > Am 29. Mai 2020 04:23:46 GMT+01:00 schrieb Keith Wright kwright@keithdian= e.us: > > > 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=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. 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 > > -- > > Diese Nachricht wurde von meinem Android-Ger=C3=A4t mit K-9 Mail gesendet= . Hah, probably everyone gets to this point after using Scheme for a while. This is my fortran code generator. https://gitlab.com/codetk/schemetran