From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [GSoC] Bourne-shell compiler front-end for Guile Date: Wed, 23 Mar 2016 22:33:38 +0200 Message-ID: <20160323203338.GA21191@debian-netbook> References: <20160321142205.5949d36c@debian-netbook> <87fuvj5uwi.fsf@gnu.org> <20160322211801.595f63e7@debian-netbook> <87oaa5uw6j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="jRHKVT23PllUwdXP" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aipTQ-0006dT-CF for guix-devel@gnu.org; Wed, 23 Mar 2016 16:33:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aipTL-0005s1-CC for guix-devel@gnu.org; Wed, 23 Mar 2016 16:33:48 -0400 Content-Disposition: inline In-Reply-To: <87oaa5uw6j.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --jRHKVT23PllUwdXP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 23, 2016 at 03:05:08PM +0100, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 > > On Mon, 21 Mar 2016 23:27:25 +0100 > > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > > >> Hi Efraim, > >>=20 > >> Thanks for your proposal! > >>=20 > >> 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. > >>=20 > >> As I see it, the project covers mostly two areas: > >>=20 > >> 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, a= nd > >> =E2=80=98test=E2=80=99 and =E2=80=98[=E2=80=99. > >>=20 > >> The available tools could be SILex + (system base lalr) (the latt= er > >> is part of Guile, the former is maintained separately; a copy can > >> be found in Guile-RPC for instance.) > >>=20 > >> 2. Run-time support: redirections, pipes, background execution, C-c > >> (SIGINT) and C-z (SIGTSTP), globbing, and so on. > >>=20 > >> 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. > >>=20 > >> 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.) > >>=20 > >> How does that sound? > >>=20 > >> 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. > >>=20 > >> Thoughts? > > > > Sounds like lots of fun, I'm really looking forward to it. And it sound= s like > > I'll need to dive deeper into bash to see what I get to implement >=20 > I guess a related question is how confident/familiar you feel with the > two areas above. The agenda could be adjusted as a function of that. >=20 > Thanks, > Ludo=E2=80=99. I feel pretty confident about the lexing and parsing; not too sure what would go into implementing the run-time support. To summarize a bit, there are two mostly overlapping parts here, one more busybox-esque where we can drop bootstrap binaries, and a second with a shell implemented in guile. At this stage I have more in the confidence/excitement side and less on the familiarity side. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --jRHKVT23PllUwdXP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJW8v2fAAoJEPTB05F+rO6TZAoP/3AkxGk/INEjxbt8O1/O/CsO cp0Vz6lxwwrUmL5iN/InzUODm0MMNftKc0XKFCIWg/aCE+sZr7QtBs5vntfgJSCG m4tCTvhUyRjRelqTTEn8HuZqcYJrqP2f74U7Csujjom/5MaJ6Bm/mL6RvrJ+ed7L fcWdow5QggYF7+qb/UBK1CJNJ+F2rEYIDmdc4UoVG0w81ZNM+eP/NoGMJKzhxzcE Jk7w6Fb5NoPR2pHBDxCzD6vFp05/frZxXrX1TYzCHbArR2HYgLm5E48k2qa4rCPE GAK+NZsua486U41Hjq7h4nEE7l6NXHUFo3/C84qwXZjMij9Rq5ve84NS7pcJqZkv pT2v7DThZSZtu1RZsnh2tGOYFknDBErUi+lES/QRiDKZFvbU3+Y4CaXzJOxItQSH IEgJhGx0WO9b9Es1kih9cO2H2s9cw+4uNolycqptZVv5hCsvi0BHe59UUJYFruch sVguRQQzJzMIxDwqEjCBr7NA8PMRcp44o2KrOWT4jfXxBDtQG3s+DHJkJZ+04Bsf cFHilXAFr8DI+IK5KLYtB++RaZJFHxLeuSv00LLc3d3OMmU+D4y6JBEVFk+cCpaO HSSVHwlIqgxU/q43xQy9xZuKtdEBAdV44dyth/cnbjjhGyKuY2R6IBqNqBQgF926 sQxPdT5W3vpGtq1xX+cR =t227 -----END PGP SIGNATURE----- --jRHKVT23PllUwdXP--