Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-soc
Navigation:
Lists: gentoo-soc: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: Gentoo SoC <gentoo-soc@g.o>
From: Sérgio Almeida <mephx.x@...>
Subject: Re: Progress on Universal Select Tool
Date: Mon, 29 Jun 2009 19:50:48 +0100
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@...")

# 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@...
mephx @ freenode

Attachment:
signature.asc (This is a digitally signed message part)
Replies:
Re: Re: Progress on Universal Select Tool
-- Sebastian Pipping
References:
Progress on Universal Select Tool
-- Sérgio Almeida
Navigation:
Lists: gentoo-soc: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Progress on Universal Select Tool
Next by thread:
Re: Re: Progress on Universal Select Tool
Previous by date:
Re: [GSoC status] Web-based image builder
Next by date:
Re: Re: Progress on Universal Select Tool


Updated Sep 12, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.