[ANN] Facets 2005-10-30

T

Trans

A N N O U N C I N G

Ruby Facets, v 2005-10-30

The Proverbial Zoo-of-More for Ruby

ABSTRACT: Ruby Facets is a cornicopia of extension methods and
module/class
additions for the Ruby programming language. The extensions, known as
the
the Atomic Library, is unique by virtue of thier atomicity. Methods are
stored in their own files, allowing for highly granular control of
requirements. In addition Facets includes a large selection of useful
classes, modules and microframeworks (once known as Calibre Classes).


For More Information
http://facets.rubyforge.org



ALL YOUR BASE ARE BELONG TO RUBY!


------------------------------------------------------------------------
(from ANN)


I'm pleased to finally announce the next major release of Facets
--the Halloween release (2005-10-30). Baring any signifficant
issues arising in Novemeber, this release will be stamped "Stable"
on the first of December.

If you'll recall, our last release was a brief flirt with new names
Nano Methods and Mega Modules. With this release we've decided to
go back to the original name Facets, having deemed it in the interm
to be the better course, and to which it will *stay for good*.
Namespace compatability is being maintained with this release, so
all the following will work as expected:

require 'facet/...'
require 'nano/...'
require 'mega/...'

This release also begins a transition to a more robust require
mechanism. You should require the main facitlity before utilizing
the rest of Facets with:

require 'facets'

This loads all base methods (about a two dozen very basic methods)
and the Facets module. Then, where you would have used the
Kernel#require method like so:

require 'facet/time/stamp' # to be deprecated

You should instead begin transitioning to:

Time.use Facets, :stamp

Using this method allows Facets to work more perceisely and
efficiently.
For instance one of the clear advantages of this method is that Facets
can search the class hierarchy for a method. For example if you wanted
to use #each_permutation on an Array.

Array.use Facets, :each_permutation

And even though #each_permutation is an Enumerable method this will
still work. It also allows for the use operators without special
recourse. For instance, the Proc composition operator can be required
simply:

Proc.use Facets, :*

The reason the Facets module is specified is because #use is a general
method. Anyone can easily take advantage of this functionality by
utilizing Facets Module Code Package system (package.rb). See the API
Documentation for further details of putting this to use in your
programs.

All in all, there's plently of new stuff in here and a good bit of code
clean-up. Some of the most notable additions include:

* annotation.rb - An advance annotations system George Moschovitis
and I developed.

* units.rb - An extensive SI Units system by Peter Vanbreokhoven.

* class_inherit - THE way to have modules include class methods when
inherited. This takes the next step beyond ClassMethods.

* inheritor.rb - A neat and useful way to inherit data through the
class heirarchy.

For the rest please see the Website, CHANGELOG and the API Docs.

*** Extra special thanks to Peter and George! ***

Thanks,

trans.
 
G

gabriele renzi

Trans ha scritto:
<snipall>

first, let me say I find your work on facets/carats/nano/mega useful and
I thank you for this, but may I suggest a little more thinking is put on
radical changes like requiring logic and names?

AFAIR in most new releases there was a major change (naming scheme for
methods, require logic, module names etc).

I'm not trying to say you did not put reasoning behind this, but
somewhat I got the feeling that the whole thing seems fragile and non
dependable (is this a word?).
 
T

Trans

gabriele said:
Trans ha scritto:
<snipall>

first, let me say I find your work on facets/carats/nano/mega useful and
I thank you for this, but may I suggest a little more thinking is put on
radical changes like requiring logic and names?

Try _too much_ thinking, not too little. Beleive me this hasn't been
easy for me and there are some circumstances regarding the name issue
that I'm won't go into b/c its long and boring. But the needless to
say, the naming issue is done.
AFAIR in most new releases there was a major change (naming scheme for
methods, require logic, module names etc).

For the last two release that's true. But Facets is beta on the whole.
It's getting more stable but it will still take a release or two before
to starts to really settle down.
I'm not trying to say you did not put reasoning behind this, but
somewhat I got the feeling that the whole thing seems fragile and non
dependable (is this a word?).

I think that's overstating a bit. Facet's is simply going through an
important transition. (The naming issue aside which was unfortunate but
incidental) This is really a transition to something _more dependable_.
Why? Think about this new way to call on methods

String.use Facets, :capitalized?

Notice there is no mention of any location in the file system. Consider
also the punctiuation mark being used and the fact that this can search
the class hierarcy for the method. This all adds up to a more robust,
more reliable system.

So yes, its a change and a transition. A different way of doing things.
But there is a great deal of benefit to gain from it. I'm trying to
make the transistion as gentle as possible.

T.
 
K

Kirk Haines

AFAIR in most new releases there was a major change (naming scheme for
methods, require logic, module names etc).

I'm not trying to say you did not put reasoning behind this, but
somewhat I got the feeling that the whole thing seems fragile and non
dependable (is this a word?).

These are reasons why, despite there being some things in Facets that are
quite similar to some code that I use, and despite me having some code that
might make sense as part of Facets, I have been very reluctant to use it or
contribute anything to it. It seems like I'd be creating a lot more work for
myself to do so, right now. I may well be wrong about that, but that's the
impression that I have.


Kirk Haines
 
T

Trans

Kirk said:
These are reasons why, despite there being some things in Facets that are
quite similar to some code that I use, and despite me having some code that
might make sense as part of Facets, I have been very reluctant to use it or
contribute anything to it. It seems like I'd be creating a lot more work for
myself to do so, right now. I may well be wrong about that, but that's the
impression that I have.

While I understand, I think maybe the concern is a bit over drawn. Yes,
there some transition going on right now with how requiring is done.
And in genreal Facets is still young so some things are still getting
settled. Using a young piece of software (especially one as vast as
Facets) means keeping pace with a more rapid growth until the software
matures. That's too be expected.

But if your just starting to use Facets, you have much less to worry
about --there will be one more significant transition with the next
release which will add built in versioning. But even then that won't be
as significant a change as this realease. And from there it's all
downhill, only getting more and more stable as time goes on.

T.
 
G

George Moschovitis

Hello Tom,
Time.use Facets, :stamp

I would prefer this to be

Time.use :facets, :stamp
or
Time.use_facet : stamp

I also prefer the current form:

require 'facets/time/stamp'


regards,
George.
 
T

Trans

George said:
Hello Tom,


I would prefer this to be

Time.use :facets, :stamp

It is not right to "take-over" usage of #use just for Facets. This is a
method analogous to 'use' in Perl and I have generalize it's
applicaiton for everyone to use, working very much like
append_features:

class Module

def package( name, &block )
@__package__ ||= {}
return @__package__ unless block_given?
@__package__[name.to_sym] = block
end

def provide_features( base, *selection )
selection.each do |s|
base.class_eval( &@__package__[s.to_sym] )
end
end

def use( package, *selection )
package.provide_features( self, *selection )
end

end
or
Time.use_facet : stamp

This is hardly any differnt, but it is too particular. The new solution
is something that can be commonly used theu is can become as
recognizable as #require itself.
I also prefer the current form:

require 'facets/time/stamp'

Me too --becuase we're accustom to it. But a new way is needed to
handle more advance fetures and it's not a good idea to hack require to
do this.

T.
 
M

Martin DeMello

Trans said:
It is not right to "take-over" usage of #use just for Facets. This is a

This is not taking over, just providing a mapping from the symbol
:facets to the class Facets for anyone who would prefer the look of the
former.

martin
 
T

Trans

Martin said:
This is not taking over, just providing a mapping from the symbol
:facets to the class Facets for anyone who would prefer the look of the
former.

Ah, my bad. I glazed right over the fact that the first symbol was
:facets. I see your point. Unfortunately using lowercase causes an
assumpition on how to convert the symbol to the moudle name. But I can
add

Time.use :Facets, :stamp

if that's helpful.

T.
 
T

Trans

Trans said:
Ah, my bad. I glazed right over the fact that the first symbol was
:facets. I see your point. Unfortunately using lowercase causes an
assumpition on how to convert the symbol to the moudle name. But I can
add

Time.use :Facets, :stamp

if that's helpful.

I've added. It will be in final 05-12 release.

T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ANN: Facets 2.0 12
[ANN] Facets / Annotations 2.0.0 1
[ANN] Facets 1.8 4
[ANN] Ruby Facets 0.7.2 0
Facets 2.8.3 released 1
[ANN] Ruby Facets, v0.6.1 0
Facets Units. How do I use it? 8
[ANN] Ruby Facets 0.6.2 13

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top