From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [GSoC] Bourne-shell compiler front-end for Guile Date: Mon, 21 Mar 2016 23:27:25 +0100 Message-ID: <87fuvj5uwi.fsf@gnu.org> References: <20160321142205.5949d36c@debian-netbook> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai8IN-0002eN-NB for guix-devel@gnu.org; Mon, 21 Mar 2016 18:27:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai8IK-0002x7-HS for guix-devel@gnu.org; Mon, 21 Mar 2016 18:27:31 -0400 In-Reply-To: <20160321142205.5949d36c@debian-netbook> (Efraim Flashner's message of "Mon, 21 Mar 2016 14:22:05 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Efraim Flashner Cc: guix-devel@gnu.org Hi Efraim, Thanks for your proposal! This project can be pretty fun, I think, and quite rewarding if it indeed allows us to get rid of a bunch of bootstrap binaries. As I see it, the project covers mostly two areas: 1. Lexing & parsing. This compiler front-end will need a real parser for the Bourne shell syntax, notably semicolon-separated command sequences, pipes, brace-delimited blocks, functions, variables, and =E2=80=98test=E2=80=99 and =E2=80=98[=E2=80=99. The available tools could be SILex + (system base lalr) (the latter is part of Guile, the former is maintained separately; a copy can be found in Guile-RPC for instance.) 2. Run-time support: redirections, pipes, background execution, C-c (SIGINT) and C-z (SIGTSTP), globbing, and so on. Guile provides just the basic here, and a little more with (ice-9 popen). Scsh and its Guile port(s) provide a lot of that, so it might be a good idea to see what can be stolen from these. It may be that some of your CS classes cover some of this ground (a fairly common programming project here at university is to implement a small shell precisely because it covers several areas.) How does that sound? Perhaps one way to get started would be by looking at the available tools for #1, and experimenting with hacks for #2, possibly borrowing code from Scsh. Thoughts? Thanks, Ludo=E2=80=99. PS: Would be nice to have a second mentor on this, either officially or unofficially (if you don=E2=80=99t want to have a to be known to Google= =E2=80=A6). Any takers? :-)