From: "Sérgio Almeida" <mephx.x@gmail.com>
To: Gentoo SoC <gentoo-soc@lists.gentoo.org>
Cc: Gentoo Dev <gentoo-dev@lists.gentoo.org>
Subject: [gentoo-soc] Re: Progress on Universal Select Tool
Date: Mon, 29 Jun 2009 19:50:48 +0100 [thread overview]
Message-ID: <1246301448.4316.68.camel@thedude> (raw)
In-Reply-To: <1245163715.14589.515.camel@thedude>
[-- Attachment #1: Type: text/plain, Size: 2817 bytes --]
Hello,
Last week has been a very "paradigmatic" working week. Several problems
urged with the addition of symlinking dependency/inheritance functions.
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
prefix /usr/bin/
regexp python([0-9]+\.[0-9]+$)
sym python-config {
bin python-config
destination /usr/bin/python-config
prefix /usr/bin/
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.
Am I reinventing the wheel?
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 = Module(description = "Python Version Switcher", version =
"0.1", author ="mephx.x@gmail.com")
# Define a Symlinking Action
bin = Action (description = "Change Python's Version", type = "sym")
#Define the SymLinks
python = Link(bin = "python", target = "/usr/bin/python", prefix =
"/usr/bin/", regexp = "python([0-9]+\.[0-9]+$")
python-config = Link(bin = "python-config", target =
"/usr/bin/python-config", prefix = "/usr/bin/", regexp =
"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.
Stay tuned on git for more updates during this week.
http://git.overlays.gentoo.org/gitweb/?p=proj/uselect.git;a=summary
Cheers,
Sérgio
--
Sérgio Almeida - mephx.x@gmail.com
mephx @ freenode
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2009-06-29 18:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 14:48 [gentoo-soc] Progress on Universal Select Tool Sérgio Almeida
2009-06-17 18:32 ` [gentoo-soc] " Sérgio Almeida
2009-06-29 18:50 ` Sérgio Almeida [this message]
2009-06-29 19:02 ` Sebastian Pipping
2009-06-29 19:42 ` Sérgio Almeida
2009-07-13 15:36 ` Sérgio Almeida
2009-07-22 18:41 ` Sérgio Almeida
2009-07-23 3:09 ` Nirbheek Chauhan
2009-07-23 4:43 ` Sérgio Almeida
2009-07-23 5:32 ` Nirbheek Chauhan
2009-07-23 7:47 ` Arun Raghavan
2009-07-23 13:40 ` Sérgio Almeida
2009-07-23 13:35 ` Sérgio Almeida
2009-07-23 15:28 ` Robert Buchholz
2009-07-23 18:33 ` Sérgio Almeida
[not found] ` <4A696F59.5000200@gentoo.org>
2009-07-24 15:20 ` [gentoo-dev] " Sérgio Almeida
2009-07-30 4:39 ` Donnie Berkholz
2009-08-01 18:46 ` Sérgio Almeida
2009-08-18 15:23 ` Sérgio Almeida
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246301448.4316.68.camel@thedude \
--to=mephx.x@gmail.com \
--cc=gentoo-dev@lists.gentoo.org \
--cc=gentoo-soc@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox