From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1MLLwM-0000tI-6R for garchives@archives.gentoo.org; Mon, 29 Jun 2009 18:50:54 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A487E03F9; Mon, 29 Jun 2009 18:50:53 +0000 (UTC) Received: from mail-bw0-f208.google.com (mail-bw0-f208.google.com [209.85.218.208]) by pigeon.gentoo.org (Postfix) with ESMTP id 8B8E6E03F9; Mon, 29 Jun 2009 18:50:52 +0000 (UTC) Received: by bwz4 with SMTP id 4so741856bwz.34 for ; Mon, 29 Jun 2009 11:50:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer; bh=3KPgPYVgtf3fNHzOiytqVoYEg/s5PIL6CG8ohEjLzbo=; b=NT5hDnlZaZkck7kQCxBDhnZVhdNZPelHwjTZ482GkH6QinueBRku5HzTbAWY1TUMPz BC/mrKh5Cgm8hl339ohhFUxhT0d0i71AA0n+DRkPyvCfVxPDTanVp6eR1OStbdZrO/Gp 07+gA0szfcbDF7qP+LyThWzvLmmGk93S7h7Cg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer; b=jQEPHS2lt/2RkmgMcakv+FV7vCpDiXDzM18gZ7zcFC2MnUAlyh8vV5brc/7T5vdlo7 yH34bKj3uWzKRnags12qf/mQqVI28np+06y5oecokRxUJ5zMwqhEKQmqkkzPtwTlnYzx 7nrV5dwqbFl8YK2izDDyfwMa6JubQ9+afZP5Y= Received: by 10.103.222.1 with SMTP id z1mr4295140muq.44.1246301451737; Mon, 29 Jun 2009 11:50:51 -0700 (PDT) Received: from ?192.168.127.16? (magdalene.ist.utl.pt [193.136.161.161]) by mx.google.com with ESMTPS id e10sm33498737muf.14.2009.06.29.11.50.50 (version=SSLv3 cipher=RC4-MD5); Mon, 29 Jun 2009 11:50:50 -0700 (PDT) Subject: [gentoo-dev] Re: Progress on Universal Select Tool From: =?ISO-8859-1?Q?S=E9rgio?= Almeida To: Gentoo SoC Cc: Gentoo Dev In-Reply-To: <1245163715.14589.515.camel@thedude> References: <1245163715.14589.515.camel@thedude> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-iAs1YT3TvrD7dVT2Dn+r" Date: Mon, 29 Jun 2009 19:50:48 +0100 Message-Id: <1246301448.4316.68.camel@thedude> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 X-Archives-Salt: be9065f3-1da9-4e6a-afd3-c1a46e76ce67 X-Archives-Hash: 2ff4f25efc8ea069aee74097b96b2a28 --=-iAs1YT3TvrD7dVT2Dn+r Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, Last week has been a very "paradigmatic" working week. Several problems urged with the addition of symlinking dependency/inheritance functions.=20 sym actions where converted to the form of: user action bin { description "Change Python's Version" type sym sym python { bin python target /usr/bin/python=20 prefix /usr/bin/=20 regexp python([0-9]+\.[0-9]+$) sym python-config { bin python-config destination /usr/bin/python-config prefix /usr/bin/=20 regexp python([0-9]+\.[0-9]+)-config($) } python-config } python } bin Soon urged the need for more complex lexical analysis and started implementing lex rules and yacc skeleton. With this step a question bounced into my head.=20 Am I reinventing the wheel?=20 Why implement lex/yacc to translate a block of code into a python's block of code? Why not use plain python in modules? After discussing with mentor, we decided to adopt python as the base language for uselect modules. The final objective is something similar to this: # Start of Module # Define the module module =3D Module(description =3D "Python Version Switcher", version =3D "0.1", author =3D"mephx.x@gmail.com") # Define a Symlinking Action bin =3D Action (description =3D "Change Python's Version", type =3D "sym") #Define the SymLinks python =3D Link(bin =3D "python", target =3D "/usr/bin/python", prefix =3D "/usr/bin/", regexp =3D "python([0-9]+\.[0-9]+$") python-config =3D Link(bin =3D "python-config", target =3D "/usr/bin/python-config", prefix =3D "/usr/bin/", regexp =3D "python-config([0-9]+\.[0-9]+$") python.add_link(python-config) # For inheritance bin.add_link(python) # Adding The Link to the action module.add_action(bin) #Adding the action to the module # End of Module This may seem complex at a glance. But why learn uselect scripting language when you do modules without even knowing python? Keep in mind that runnable actions will still be supported and therefore supporting any scripting language for actions. Python will be the easiest one as will depend on basic class inheritance and implementation of functions. All this lead to the start of a new phase. Define a strong and simple API definition for all of uselect's capabilities creating the interfaces easily usable. uselect's profiles will also be in plain python, using the API of uselect's Python Module umodule. Last week had no commits to git due to all this. I intend to clean up all the "basic (ang buggy) lexical analysis" that was already implemented and re-implement the new module API during this week.=20 Stay tuned on git for more updates during this week. http://git.overlays.gentoo.org/gitweb/?p=3Dproj/uselect.git;a=3Dsummary=20 Cheers, S=C3=A9rgio --=20 S=C3=A9rgio Almeida - mephx.x@gmail.com mephx @ freenode --=-iAs1YT3TvrD7dVT2Dn+r Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkpJDQEACgkQQXumuXcKj07JbwCfYEkf3EFopY11EB1dPq0LluRb gxIAnjfLfXPWmeiqGufiqTP+PqU40ewA =AOUz -----END PGP SIGNATURE----- --=-iAs1YT3TvrD7dVT2Dn+r--