[ANN] Nano Methods & Mega Modules

(7rans) #1

A N N O U N C I N G

                       Nano Methods, v0.8.1

                 Ruby's Atomic Extensions Library

                    http://nano.rubyforge.org

ABSTRACT: Nano Methods is a cornicopia of extension methods for the
Ruby programming language. Nano's extensions are unique by virtue of
thier atomicity. Methods are stored in their own files, allowing for
highly granular control of requirements.

                              - & -

                       Mega Modules, v0.3.1

         Ruby's Massive Class and Module Additions Library

                    http://mega.rubyforge.org

ABSTRACT: Mega Modules is a large and growing collection of quality
classes amd modules suitable to a wide variety of applications.

···

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

INTRODUCTION. I'm happy to announce two new sister projects: Nano
Methods and Mega Modules. They are born from the heritage of the old
Ruby Facets project (now deprecated). In the course of the last several
months a slew of major improvements have been made. We have some spiffy
new websites and, most importantly, this release marks the beginning of
a clear window toward 1.0 status. Details of changes follow, but
first...

GREAT NEWS! Nano Methods and Mega Modules are now the official support
libraries for Nitro and Og (http://www.nitrohq.com). Nitro is a
sophisticated Web Application Engine, and Og is an intuitive but
powerful
Object Relational Mapping Library.

FOR FACETS USERS. To upgrade, the project name change will require you
to change the #require path-space from 'facet/' to 'nano/', or
occasionally 'mega/'. The division is pretty clear, Nano stores methods
and Mega stores classes and modules. Sorry for the inconvenience, but
after a long debate I decided it was worth it --and better to do so now
rather then later. Hope you like the new names.

WHY MEGA? Okay, you may have noticed that I back peddled on the major
change of Facets 0.7.0. In that release I had merged the class and
module
additions library, Ruby Carats, into Facets. But I had to separate them
out again. It simply proved too cumbersome to have such a variety of
content all in one location. I am very excited the re-separation
though.
It has already lent itself to major improvements to the library, with a
number of exciting additions on the way.

NANO SYSTEM. A great new feature is the introduction of the NanoSystem
module. This module provides access to meta-info about Nano's
extensions. Primarily it is an index of all the methods. With this
information at its disposal another unique way to require method
becomes
possible:

  require 'nanosys'

  String.use :capitalized?, :underscore

I am not recommending this approach at the moment. But in the long run,
as the NanoSystem module matures, it may well prove to be a much more
elegant means of doing so.

CORNUCOPIA. There are also _a lot_ of minor changes in this release.
Some of them are simply improvements in the naming of methods or
more appropriate class/module placement. I've gone over all the
methods enough now to be confident that the present methods are pretty
well set. You can expect many fewer name/location changes from here on
out. Also, a good number of new methods have been added. Most of these
I
have managed to make mention of in the following ChangeLog summary.

* Class methods are now prefixed with '::' to separate them from
instance methods.

* Added logger #format and #format_message (Note: whomever wrote these
please let me know, I got them thru a second-hand source and the
original
author is lost to me. I try very hard to give credit where credit is
due.)

* Renamed object/supers to object/superup, which is just a better name.

* Got rid of symbol/gen. Use object/generate_method_name or
module#generate_instance_method_name instead. [ed- Is that the longest
non-foo method name ever?]

* The file 1st.rb file has moved to object/method!. This provides a
version of #method that persists the returned Method object.

* Added module/clone_using, module/clone_renaming and
module/clone_removing.

* Added module/integrate (I love this one, but note that its syntax is
not yet set in stone.)

* Added many new enumerable methods: #filter_map, #compact_map,
#commonality, #frequency, #probability and #find_collisions.

* Moved some methods from array to enumerable: #each_permutation,
#each_combination, #each_unique_pair and the class method
::combinations.

* Added string/bytes per ruby-dev summary 26385-26467.

* Moved #cattr_reader, #cattr_writer and #cattr_accessor from Class to
Module. These are the class variable attributes as defined by Rails
DHH.

* Added class instance attribute methods: iattr_reader, iatter_writer,
&c. The name of these are not set in stone. It's a bad misnomer.
Looking
for suggestions.

* Added methods to comparable: #cap, #clip. #clip replaces #bound_by,
since 'by' generally indicates the method takes a block parameter. I
have retained #at_least and #at_most, although #cap and #clip handle
the
same functionality.

* Added class/descendants (alias subclasses) and
class/remove_descendants.

* Removed string/table_name and string/class_name (were too Rails
specific). Note: A new module has been added to Mega Modules, called
orm_inflect.rb. It contains numerous methods for doing this sort of
thing.

* Added numeric/ceil_multiple.

* Added string/soundex for calculating the soundex code of a word/name.

* numeric/octet_units has bee moved to mega/binary_multipliers, which
is
a rewrite of Richard Kilmer's bytes.rb. Actually #octet_units is now
just an alias or #strfbytes, accompanied by #strfbits.

* Placed Florian's binding-of-caller.rb in binding/of_caller. Makes
more
sense there.

* Fixed Continuation::create; it wasn't defined as a class method and
should have been.

* Fixed bug with string/capitalized? which wasn't always giving the
correct result.

There are others, but this particular session of development was
so rapid and choked full, I wasn't able to log them all. Please see
the API RDocs for a complete listing.

CONTRIBUTE. As always, if you have any extension methods that you use
and think may be of benefit to others, please submit them. There's a
good chance they'll be incorporated. Also, if you happen to notice any
code that is mis-credited or is not credited at all and should be,
please correct me. Giving credit where credit is due is _very_
important
to me. And, of course, please let me know if you come across any bugs.

You can contact me either privately or via ruby-talk.

Thanks and Enjoy,

trans>onoma

-----------------------------------------------------------------------
Generated by Reap, a Rake-based Ruby Project Assistant.
Do you Ruby? (http://www.ruby-lang.org)

(Lloyd Zusman) #2

"Trans" <transfire@gmail.com> writes:

                       A N N O U N C I N G

                       Nano Methods, v0.8.1

[ ... ]

This looks great! ... and I'm eager to start using it. Therefore, I
attemtped to install the gem, but I ran into this error:

  % gem install nano
  Attempting local installation of 'nano'
  Local gem file not found: nano*.gem
  Attempting remote installation of 'nano'
  Updating Gem source index for: http://gems.rubyforge.org
  ERROR: While executing gem ... (NoMethodError)
     undefined method `close' for nil:NilClass

  % ruby --version
  ruby 1.9.0 (2005-08-29) [i686-linux]

Any ideas?

Thanks in advance.

···

--
Lloyd Zusman
ljz@asfast.com
God bless you.

(James Britt) #3

Trans wrote:

                       A N N O U N C I N G

                       Nano Methods, v0.8.1

                 Ruby's Atomic Extensions Library

Neat.

Ruby on RAEL

James

···

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

(Pascal GUICHARD) #4

I have had the same symptoms, when trying to install gem with ruby19 (ruby
setup.rb all). It seems to me to be a ruby19 issue.
At present, i cant' anymore compile it.
So i delayed trying to use ruby 19, and stepped back toruby183.
aside of this ruby19 issue, i cant' install nano nonetheless :
  
$ ruby -v
ruby 1.8.3 (2005-08-18) [i386-cygwin]

Administrateur@pg /src/ruby
$ gem i nano
Attempting local installation of 'nano'
Local gem file not found: nano*.gem
Attempting remote installation of 'nano'
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory - lib/nano/float/approx?.rb

any ideas ?

···

On 8/31/05, Lloyd Zusman <ljz@asfast.com> wrote:

"Trans" <transfire@gmail.com> writes:

> A N N O U N C I N G
>
>
> Nano Methods, v0.8.1
>
> [ ... ]

This looks great! ... and I'm eager to start using it. Therefore, I
attemtped to install the gem, but I ran into this error:

% gem install nano
Attempting local installation of 'nano'
Local gem file not found: nano*.gem
Attempting remote installation of 'nano'
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (NoMethodError)
undefined method `close' for nil:NilClass

% ruby --version
ruby 1.9.0 (2005-08-29) [i686-linux]

Any ideas?

Thanks in advance.

--
Lloyd Zusman
ljz@asfast.com
God bless you.

(7rans) #5

Lloyd Zusman wrote:

This looks great! ... and I'm eager to start using it. Therefore, I
attemtped to install the gem, but I ran into this error:

  % gem install nano
  Attempting local installation of 'nano'
  Local gem file not found: nano*.gem
  Attempting remote installation of 'nano'
  Updating Gem source index for: http://gems.rubyforge.org
  ERROR: While executing gem ... (NoMethodError)
     undefined method `close' for nil:NilClass

  % ruby --version
  ruby 1.9.0 (2005-08-29) [i686-linux]

Any ideas?

Thanks in advance.

Hi--

I'm running 1.8.2 [i386-linux], and it installs fine. So I'm not sure.
What version of Gems are you using?

T.

(Gavin Kistner) #6

FWIW it fails for me in a different way:

C:\Documents and Settings\gavin.kistner>gem install nano
Attempting local installation of 'nano'
Local gem file not found: nano*.gem
Attempting remote installation of 'nano'
Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Errno::EINVAL)
    Invalid argument - lib/nano/float/approx?.rb

C:\Documents and Settings\gavin.kistner>gem --version
0.8.10

C:\Documents and Settings\gavin.kistner>ruby --version
ruby 1.8.2 (2004-12-25) [i386-mswin32]

(William Morgan) #7

Excerpts from James Britt's mail of 30 Aug 2005 (CDT):

Trans wrote:
> A N N O U N C I N G
>
>
> Nano Methods, v0.8.1
>
> Ruby's Atomic Extensions Library

Neat.

Ruby on RAEL

···

--
William Morgan <wmorgan-ruby-talk@masanjin.net>

#8

"?" isn't allowed in NTFS filenames - you can't have "approx?.rb" on
Windows.

···

On 8/31/05, Pascal GUICHARD <pascal.guichard@gmail.com> wrote:

Updating Gem source index for: http://gems.rubyforge.org
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory - lib/nano/float/approx?.rb

(7rans) #9

Ah, both the same problem. A file (approx?) is in the package with a
non-escaped punctution mark (it should be approx%3F). I have fixed and
reuploaded.

Thanks for the reports!

T.

(Christian Neukirchen) #10

William Morgan <wmorgan-ruby-talk@masanjin.net> writes:

Excerpts from James Britt's mail of 30 Aug 2005 (CDT):

Trans wrote:
> A N N O U N C I N G
>
>
> Nano Methods, v0.8.1
>
> Ruby's Atomic Extensions Library

Neat.

Ruby on RAEL

http://flickr.com/photos/41715395@N00/31541062/

http://rubyonrael.com/

···

William Morgan

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org

(7rans) #11

That's correct. And in fact esacaping all the file/method names with
punctuation was a major fix of the previous release. But one obiouly
slipped through. I did a search to see if their were any others and did
not turn up any hits. So it should be fine from here on out.

Linux/Unix users likly had no trouble, but just the same should
reinstall to get the fixed file. With Gems:

  gem udpate nano

T.

···

dave.burt@gmail.com wrote:

On 8/31/05, Pascal GUICHARD <pascal.guichard@gmail.com> wrote:
> Updating Gem source index for: http://gems.rubyforge.org
> ERROR: While executing gem ... (Errno::ENOENT)
> No such file or directory - lib/nano/float/approx?.rb

"?" isn't allowed in NTFS filenames - you can't have "approx?.rb" on
Windows.

(Gavin Kistner) #12

Closer, but not there yet:

ERROR: While executing gem ... (Errno::EINVAL)
    Invalid argument - pub/www/doc/files/lib/nano/float/approx?_rb.html

(7rans) #13

Phrogz wrote:

Closer, but not there yet:

ERROR: While executing gem ... (Errno::EINVAL)
    Invalid argument - pub/www/doc/files/lib/nano/float/approx?_rb.html

Strange. I wonder where that underscore is coming from? Well, I did an
entire "clean" repackage and bumped the version number just in case
(0.8.1 -> 0.8.2).
Please try it again. And let me know.

Thanks,
T.

(Gavin Kistner) #14

That got it installing correctly for Windows :slight_smile:

···

On Aug 30, 2005, at 8:06 PM, Trans wrote:

Strange. I wonder where that underscore is coming from? Well, I did an
entire "clean" repackage and bumped the version number just in case
(0.8.1 -> 0.8.2).
Please try it again. And let me know.

(Randy Kramer) #15

I should have asked this question on the earlier post where an entity (?
iirc?) was suggested to replace the "?" in the file name.

I wouldn't have thought Windows can handle the file name even with such an
"entity" in place of the "?"--can it?

Randy Kramer

···

On Tuesday 30 August 2005 10:06 pm, Trans wrote:

Phrogz wrote:
> Closer, but not there yet:
>
> ERROR: While executing gem ... (Errno::EINVAL)
> Invalid argument - pub/www/doc/files/lib/nano/float/approx?_rb.html

(7rans) #16

Gavin Kistner wrote:

···

On Aug 30, 2005, at 8:06 PM, Trans wrote:
> Strange. I wonder where that underscore is coming from? Well, I did an
> entire "clean" repackage and bumped the version number just in case
> (0.8.1 -> 0.8.2).
> Please try it again. And let me know.

That got it installing correctly for Windows :slight_smile:

Great! Thanks for letting me know.

T.

(7rans) #17

Randy Kramer wrote:

···

On Tuesday 30 August 2005 10:06 pm, Trans wrote:
> Phrogz wrote:
> > Closer, but not there yet:
> >
> > ERROR: While executing gem ... (Errno::EINVAL)
> > Invalid argument - pub/www/doc/files/lib/nano/float/approx?_rb.html

I should have asked this question on the earlier post where an entity (?
iirc?) was suggested to replace the "?" in the file name.

I wouldn't have thought Windows can handle the file name even with such an
"entity" in place of the "?"--can it?

URI codes, so ? -> %3F. % is acceptable, so it should work okay.

T.

(George Moschovitis) #18

At least this is released :slight_smile:

Congratulations for your *excellent* work!

regards,
George.

···

--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com

(Randy Kramer) #19

Thanks!

Randy Kramer

···

On Wednesday 31 August 2005 11:31 am, Trans wrote:

Randy Kramer wrote:
> I wouldn't have thought Windows can handle the file name even with such
> an "entity" in place of the "?"--can it?

URI codes, so ? -> %3F. % is acceptable, so it should work okay.