From transfire at gmail.com Fri Oct 3 14:43:00 2008 From: transfire at gmail.com (Trans) Date: Fri, 3 Oct 2008 11:43:00 -0700 (PDT) Subject: [Facets] Facets 2.4.5 Message-ID: <2878c120-a718-4aaa-ae6e-29a5bdafba20@u57g2000hsf.googlegroups.com> Facets 2.4.5 is a maintenance release. Primarily it just fixes a few bugs. This release is notable however in that it will likely be the last that to use SVN. Facets will be switching to Git. Also, some libraries that have been flagged "to be deprecated" for a while will finally be so. ### 2.4.5 / 2008-10-02 * 6 Major Enhancements * Re-added improved date.rb to lore library, and removed from core. * Deprecated kernel/suppress. Use Exception.suppress from now on. * Deprecated string/style.rb. Use English project instead. * Console name space is no longer for Ansicode. * OpenCascade automatically creates nodes, use foo? to query. * 11 Minor Enhancements * Moved variablize methods out of metaid.rb and into separate files. * Added Time#advance. * Speed up of Integer odd/even methods. (Thanks to Daniel Schierbeck). * Array#index now takes a block (this is a core override). * Spilt file/write.rb into separate method files (append, create, writelines). * Modified Enumerable#split to behave like String#split. * hash/op.rb, split into separate method files. * Added string/modulize. string/methodize handles path names now too. * Class#cattr is now part of core (since both Merb And ActiveSupport do too). * 2 Bug Fixes * OpenStruct#to_h dups internal table. * Fixed require of string/xor in bicrypt.rb. * integer/odd.rb, fixed Ruby 1.9 condition. * Enumerable#mode now returns array since there can be more than one. From transfire at gmail.com Fri Oct 3 14:48:14 2008 From: transfire at gmail.com (Trans) Date: Fri, 3 Oct 2008 11:48:14 -0700 (PDT) Subject: [Facets] Module#conflict? Message-ID: Note that in the latest release, Module#conflict? has been altered to not consider methods shared by a common ancestor as "conflicts". T. From transfire at gmail.com Mon Oct 6 13:32:12 2008 From: transfire at gmail.com (Trans) Date: Mon, 6 Oct 2008 10:32:12 -0700 (PDT) Subject: [Facets] Rich Units Message-ID: <54f46e8a-d799-4867-b306-cdcd5184908b@p49g2000hsd.googlegroups.com> Some heads up on upcoming changes to Facets. If you use any of these More libs: bytes.rb multipliers.rb times.rb duration.rb You will need to install the rich_units gem, and change your requires to 'rich_units/{libname}' or just require 'rich_units' to load all of them at once. Note: Although Rich Units includes duration.rb, a copy of the lib will remain in Facets at least for the time being --I haven't decided if it stands enough on it's own or should stick solely with this unit system. See http://richunits.rubyforge.org. T. P.S. Anyone one have an opinion on calling this library 'richunits' vs. 'rich_units'? From noreply at rubyforge.org Wed Oct 15 11:38:22 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 15 Oct 2008 11:38:22 -0400 (EDT) Subject: [Facets] [ facets-Bugs-22436 ] memoize caches instance methods per-class, but it should be per-instance Message-ID: <20081015153822.BACB518585AB@rubyforge.org> Bugs item #22436, was opened at 2008-10-15 15:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 Category: Code Group: None Status: Open Resolution: None Priority: 3 Submitted By: Rich Bradley (richbradley) Assigned to: Nobody (None) Summary: memoize caches instance methods per-class, but it should be per-instance Initial Comment: Surely "memoize" should cache instance methods per-instance, not per-class? Otherwise you get really bizzare behaviour like the following: {{{ require 'rubygems' require 'facets' require 'facets/memoize' class Integer def expensive_property sleep(2) "i am number #{self}" end end 3.expensive_property #=> "i am number 3" #(slow) 4.expensive_property #=> "i am number 4" #(slow) Integer.send(:memoize, :expensive_property) 3.expensive_property #=> "i am number 3" #(slow) 3.expensive_property #=> "i am number 3" #(fast; cached) 4.expensive_property #=> "i am number 3" #!!! }}} Also, the example given in the doc uses @a, which I think implies that memoize is instance-specific, even thought the current implementation is not. I notice that Kernel#cache is per-instance. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 From noreply at rubyforge.org Wed Oct 15 11:39:35 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 15 Oct 2008 11:39:35 -0400 (EDT) Subject: [Facets] [ facets-Bugs-22436 ] memoize caches instance methods per-class, but it should be per-instance Message-ID: <20081015153935.ED8B518585AB@rubyforge.org> Bugs item #22436, was opened at 2008-10-15 15:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 Category: Code Group: None Status: Open Resolution: None Priority: 3 Submitted By: Rich Bradley (richbradley) Assigned to: Nobody (None) Summary: memoize caches instance methods per-class, but it should be per-instance Initial Comment: Surely "memoize" should cache instance methods per-instance, not per-class? Otherwise you get really bizzare behaviour like the following: {{{ require 'rubygems' require 'facets' require 'facets/memoize' class Integer def expensive_property sleep(2) "i am number #{self}" end end 3.expensive_property #=> "i am number 3" #(slow) 4.expensive_property #=> "i am number 4" #(slow) Integer.send(:memoize, :expensive_property) 3.expensive_property #=> "i am number 3" #(slow) 3.expensive_property #=> "i am number 3" #(fast; cached) 4.expensive_property #=> "i am number 3" #!!! }}} Also, the example given in the doc uses @a, which I think implies that memoize is instance-specific, even thought the current implementation is not. I notice that Kernel#cache is per-instance. ---------------------------------------------------------------------- >Comment By: Rich Bradley (richbradley) Date: 2008-10-15 15:39 Message: I can't get git to work against rubyforge :-( $ git clone git://rubyforge.org/facets.git Initialized empty Git repository in /home/yudulibrary/ facets/facets/.git/ fatal: The remote end hung up unexpectedly fetch-pack from 'git://rubyforge.org/facets.git' failed. (Also, if I try and browse the source tree I get a 403 http://facets.rubyforge.org/git?p=facets.git;a=tree ) ... so here's a patch against the 2.4.5 gem, which I can get :-) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 From noreply at rubyforge.org Wed Oct 29 12:46:16 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 29 Oct 2008 12:46:16 -0400 (EDT) Subject: [Facets] [ facets-Bugs-22436 ] memoize caches instance methods per-class, but it should be per-instance Message-ID: <20081029164616.45D7518588E4@rubyforge.org> Bugs item #22436, was opened at 2008-10-15 10:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 Category: Code Group: None Status: Open Resolution: None Priority: 3 Submitted By: Rich Bradley (richbradley) Assigned to: Nobody (None) Summary: memoize caches instance methods per-class, but it should be per-instance Initial Comment: Surely "memoize" should cache instance methods per-instance, not per-class? Otherwise you get really bizzare behaviour like the following: {{{ require 'rubygems' require 'facets' require 'facets/memoize' class Integer def expensive_property sleep(2) "i am number #{self}" end end 3.expensive_property #=> "i am number 3" #(slow) 4.expensive_property #=> "i am number 4" #(slow) Integer.send(:memoize, :expensive_property) 3.expensive_property #=> "i am number 3" #(slow) 3.expensive_property #=> "i am number 3" #(fast; cached) 4.expensive_property #=> "i am number 3" #!!! }}} Also, the example given in the doc uses @a, which I think implies that memoize is instance-specific, even thought the current implementation is not. I notice that Kernel#cache is per-instance. ---------------------------------------------------------------------- >Comment By: 7rans (transami) Date: 2008-10-29 11:46 Message: All fixed! Will be in the next release (probably 2.5). Note that ultimately that lib will likely be overhauled to use CacheDelegator. About the git repo. I switched to git just a few weeks ago and finally initialized the repo today. So it's there now. Thanks for the report! ---------------------------------------------------------------------- Comment By: Rich Bradley (richbradley) Date: 2008-10-15 10:39 Message: I can't get git to work against rubyforge :-( $ git clone git://rubyforge.org/facets.git Initialized empty Git repository in /home/yudulibrary/ facets/facets/.git/ fatal: The remote end hung up unexpectedly fetch-pack from 'git://rubyforge.org/facets.git' failed. (Also, if I try and browse the source tree I get a 403 http://facets.rubyforge.org/git?p=facets.git;a=tree ) ... so here's a patch against the 2.4.5 gem, which I can get :-) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 From noreply at rubyforge.org Wed Oct 29 12:46:37 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 29 Oct 2008 12:46:37 -0400 (EDT) Subject: [Facets] [ facets-Bugs-22436 ] memoize caches instance methods per-class, but it should be per-instance Message-ID: <20081029164637.6B5F218588E4@rubyforge.org> Bugs item #22436, was opened at 2008-10-15 10:38 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804 Category: Code Group: None >Status: Closed Resolution: None >Priority: 4 Submitted By: Rich Bradley (richbradley) Assigned to: Nobody (None) Summary: memoize caches instance methods per-class, but it should be per-instance Initial Comment: Surely "memoize" should cache instance methods per-instance, not per-class? Otherwise you get really bizzare behaviour like the following: {{{ require 'rubygems' require 'facets' require 'facets/memoize' class Integer def expensive_property sleep(2) "i am number #{self}" end end 3.expensive_property #=> "i am number 3" #(slow) 4.expensive_property #=> "i am number 4" #(slow) Integer.send(:memoize, :expensive_property) 3.expensive_property #=> "i am number 3" #(slow) 3.expensive_property #=> "i am number 3" #(fast; cached) 4.expensive_property #=> "i am number 3" #!!! }}} Also, the example given in the doc uses @a, which I think implies that memoize is instance-specific, even thought the current implementation is not. I notice that Kernel#cache is per-instance. ---------------------------------------------------------------------- Comment By: 7rans (transami) Date: 2008-10-29 11:46 Message: All fixed! Will be in the next release (probably 2.5). Note that ultimately that lib will likely be overhauled to use CacheDelegator. About the git repo. I switched to git just a few weeks ago and finally initialized the repo today. So it's there now. Thanks for the report! ---------------------------------------------------------------------- Comment By: Rich Bradley (richbradley) Date: 2008-10-15 10:39 Message: I can't get git to work against rubyforge :-( $ git clone git://rubyforge.org/facets.git Initialized empty Git repository in /home/yudulibrary/ facets/facets/.git/ fatal: The remote end hung up unexpectedly fetch-pack from 'git://rubyforge.org/facets.git' failed. (Also, if I try and browse the source tree I get a 403 http://facets.rubyforge.org/git?p=facets.git;a=tree ) ... so here's a patch against the 2.4.5 gem, which I can get :-) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=3169&aid=22436&group_id=804