177639-181017

177426-182627 subjects 177768-180432

memoize to a file
177639 [briankbuckle] ...
+ 177641 [logancapaldo] begin
+ 177651 [ mfp@ac .o g] IIRC File.read(file) doesn't open the file in binary mode; try
| + 177656 [briankbuckle] ...
| + 177663 [ara.t.howard] why not pstore - it's done all that already and is built-in?
|   177664 [james@gr yp ] PStore is just a wrapper on top of Marshal for transactional file
|   177666 [ara.t.howard] it's not quite only that.  it also
|   + 177673 [james@gr yp ] These are all great points.  Thanks for the lesson.  ;)
|   + 178237 [james@gr yp ] ...
+ 177808 [djberg96@gm ] That is odd.  I've run it on Windows with no trouble in the past.  Is
| + 177820 [bob.news@gm ] As you and others have pointed out this is lilely a problem caused by not
| + 177899 [briankbuckle] ...
| + 177904 [ mfp@ac .o g] (FTR: file not opened in binary mode, [177651])
|   178004 [Daniel.Berge] I guess I'm once bitten, twice shy as a result of the transition from 1.6.8 to 1.8.0 not too long ago.  Thanks for the correction.
|   178008 [Daniel.Berge] I have applied that patch along with Andrew Johnson's refactoring.  I
+ 177812 [interfecus@g] Just a thought, but you might like to load this file using the binary

GD2
177655 [chris@ar ch ] I've installed a copy of the GD2 gem to use in a web application I'm

callbacks, events, notification in general
177661 [damphyr@fr e] I want to have some kind of event notification from my classes.
+ 177670 [ara.t.howard] require "observer"
| 177687 [damphyr@fr e] Well, actually it would be a good start to remember the names of the
| + 177694 [ara.t.howard] heh.  i'm guilty often on that count too - the design patterns books is pretty
| + 177851 [bob.news@gm ] def observe(observable)
+ 177681 [lukfugl@gm i] I second Ara's mention of the Observable module. That said, I'd also
+ 177847 [bob.news@gm ] I find usage of a symbol quite clumsy.  One of the drawbacks is that it
+ 177865 [payton@fo lo] Not sure if it's any help, but here's something I've been using in my
| 177981 [payton@fo lo] class A
+ 177991 [ilmari.heikk] class Wrapper  instance_methods.grep(/^[^_]{2,2}/).each{|im|    undef_method im  }  attr_accessor :handlers

YAML-ing classes and modules in 1.8.4 -- Was: Re: Extend an
177665 [andrea.regin] I will try in the next days.

How does one determine an objects class?
177676 [info@ja eo a] Say I've got
+ 177677 [james@gr yp ] str.class
+ 177678 [halostatue@g] Which object?
+ 177680 [kabigon@gm i] puts str.class
+ 177684 [info@ja eo a] Thanks chaps! I must say that I am impressed with the speedy reply:)
+ 177848 [bob.news@gm ] str is of class String.
+ 177849 [acangianohat] John, you can use the Object#class method.

ANN: WSS4R was released
177686 [Roland.Schmi] WSS4R is a subset of a web service security standards implementation. It's
177692 [halostatue@g] Very cool.
177695 [ara.t.howard] i hate thinking about this stuff and have just released under ruby's licence
177696 [halostatue@g] Not at all. My problem here is that WSS4R is under GNU GPL only, not
177700 [gregory.t.br] That's really highly subjective.  Outside of Ruby, I *always* use the GPL.
177701 [halostatue@g] Hmmm. Not really subjective. The GNU GPL is explicitly a highly
+ 177703 [gregory.t.br] It is a highly protective license, yes.  All of it's restrictions are
| 177708 [halostatue@g] Um. Strictly speaking, once an open source package has been released
| 177882 [gregory.t.br] I am not sure if what I said was clear enough.  I mean, the GPL is
| 177976 [halostatue@g] Excellent!
+ 177710 [billk@ct .c ] Freer?  Yes, if you are talking about the individual freedom of
  + 177711 [billk@ct .c ] er, 1998, sorry....  <:-}
  + 177714 [halostatue@g] No, I mean freer. Period. I place minimal restrictions on my software. I
    177868 [gregory.t.br] I am again, a proponent of the preamble, but I believe there is a GPL

[ANN] Phoenix Ruby Users Group February Meeting
177688 [james_b@ne r] Monday, February 13

PDF::Writer running out of memory
177693 [damphyr@fr e] I have a bunch of XML files containing specifications and I want to
177698 [halostatue@g] I have had someone else report this and provide me with a customized

Fwd: Feb BYU RUG meeting 1 week notice
177702 [pat.eyler@gm] The BYU Ruby Users Group will be holding its February meeting

Gateway broken (1-Feb-2006)
177705 [Daniel.Berge] The gateway is broken again.  Posts from usenet (google groups, whatever) are
+ 177860 [djberg96@gm ] Upon further review, it looks like posts from ruby-talk are making it
| + 177875 [bob.news@gm ] Let's see whether this makes it from news -> mail.  (I guess it won't.)
| + 177905 [lukfugl@gm i] Looks like they weren't dropped after all (from c.l.r -> ruby-talk),
+ 177872 [shortcutter@] +1

Template language similar to examples...
177707 [elriba@ri it] I would like to process a text file which contains property-tokens which
177713 [rossrt@ro co] (Apologies if this is a dupe, messages that cross the gateway seem to

Seeking Continuations Links
177712 [james@gr yp ] Myself and a few others are trying to get together a "Playing Around
+ 177866 [ara.t.howard] trying to get a headache james?  ;-)
| 177938 [james@gr yp ] <laughs>  Probably.
| 178041 [netghost@gm ] Headaches for all!
+ 177887 [martindemell] martin
+ 177888 [surrender_it] Also, I have a page in italian about a small part of what Kernel#callc
+ 177912 [james_b@ne r] Is there a an online copy (video, I hope) of the continuations talk by
| 178050 [ezmobius@gm ] Folks-
| 178103 [james@gr yp ] Are the unit tests from this talk, like when they implemented catch/
| 178105 [wilsonb@gm i] I had the pleasure of attending that workshop. Very cool.
| 178247 [james@gr yp ] James Edward Gray II
+ 178763 [rosejn@gm il] ...

Indentation vs. "end"s
177715 [nuby.ruby.pr] I *REALLY* love Ruby very much. But I always find those "end"s somewhat
+ 177719 [l.d.u.n.c.a.] I've got to declare that I also like the idea of dropping the ends a la
| + 177727 [nuby.ruby.pr] Thank God! I am not alone on the earth!  ;-D
| | 177951 [jimfreeze@gm] ...
| | + 177957 [rossrt@ro co] "Programming languages and Python". Love it.
| | + 177979 [james@gr yp ] <dies laughing>
| | | 177989 [luc@ho k- on] Erm, you probably mean dies.__laughing__(), right ? :>
| | + 178052 [steven@lu os] Nice Twain.
| | + 178091 [l.d.u.n.c.a.] Classic!
| + 177871 [drbrain@se m] I typically find I'm doing something wrong if I have five ends in a
|   177907 [gwtmp01@ma .] +1
+ 177721 [jeff@sc wa c] I like having something to search for in my editor.  Explicit
| 177724 [ptkwt@ar cn ] And having 'end' sure makes things like ERB easier (possible) to implement.
| 177870 [hawkman.gelo] ...
| 177930 [jeff@sc wa c] I loved my TI-82, and I remember how excited I was over my 85.  Now that
| 177948 [hawkman.gelo] ...
| + 178039 [unixwzrd@ma ] ...
| + 178040 [unixwzrd@ma ] Somehow my first message got swallowed up...
|   178042 [Daniel.Berge] And here I thought you were being ironicle. ;)
|   178044 [unixwzrd@ma ] Never thought about it really, but that would have been the "end" of
|   178051 [jeff.barczew] ...
|   178056 [Meino.Cramer] Ruby is Ruby not a copy of others.
+ 177722 [doug00@gm il] Yes I really like the end statements, and they make it easier for
| + 177728 [nuby.ruby.pr] That sound like a good idea. But what about "if", "when", "for",
| | + 177729 [penryu@sa yi] Or how 'bout "if - fi" and "until - done" and "for - done"...
| | + 177880 [halostatue@g] def foo
| |   177911 [skilic@gm il] Honestly, I prefer ENDs to indentation, I prefer curly braces to ENDs.
| |   + 177923 [marcantonios] ...
| |   + 178090 [l.d.u.n.c.a.] Oooh. Now I found quite attractive. It's like a single bookend keeping
| |   + 178096 [nuby.ruby.pr] Hakkaten de fena fikir degilmis...
| + 177886 [david@va ln ] Holy mother of god in the heavens, for the love of all that's good and sacred,
| + 177943 [hal9000@hy e] Not a bad idea in itself. In fact, I think that really old Ruby
| | + 178133 [matz@ru y- a] Very old versions of Ruby, before Wed August 24 1994, according to the
| | + 178227 [hramrach@gm ] Even if "end if" is no longer feasible to parse because of the ifmodifier there is still the possibility to have optional "end def" and"end class" instead of just "end". It could make finding the placewhere an end is missing much easier.
| |   178229 [sky.yin@gm i] (0..10).each do |i|
| |   178249 [doug00@gm il] end do
| |   + 178258 [lists@ha ff ] My first reaction was "end each"...  After all, "do" and "end" are just
| |   | + 178268 [sky.yin@gm i] I may take back the previous agreement on the "end option". Since
| |   | + 178271 [doug00@gm il] You're ending a closure block, which starts with "do".
| |   |   178291 [paul@ic no l] I've been following this quietly. Just thought I'd drop in a thought
| |   + 178266 [unixwzrd@ma ] ...
| |   + 178277 [wilsonb@gm i] def blah(var)
| |     + 178290 [hawkman.gelo] ...
| |     + 178556 [snowzone5@ho] def blah(var)
| + 178539 [joesb.coe9@g] Instead of voting for multiple "end xxx", I would like to suggest that
|   + 178576 [joesb.coe9@g] To extends it further, may be a syntax for a method to specify what
|   + 178578 [hal9000@hy e] I think I like this. If it were an RCR, I just might vote for it.
|     178616 [r.mark.volkm] I definitely wouldn't want that. I really feel that "less is more".
|     178629 [kiaroskuro@g] ...
|     178634 [peter@se an ] NOT EVERYONE HAS ENGLISH AS A FIRST LANGUAGE!!!!!
|     + 178635 [kiaroskuro@g] ...
|     | 178637 [julesjacobs@] class Person is
|     + 178638 [klancaster19] I can't help but think that I am not the only one here that thinks this
+ 177736 [nicholas_wie] You're asking for trouble when using something like eruby.
+ 177877 [shortcutter@] I don't even think about them.  I just use the language as it is.
| 178069 [jim.mcfarlan] That sums up my opinion on "end" in Ruby as well.
+ 177879 [halostatue@g] I hope that the mistake that Python makes isn't repeated in Ruby 2.0.
| 178330 [surrender_it] are you citing line 2 of "the zen of python"[1] consciously? :)
| + 178362 [eustaquioran] Me too. I always say that the Ruby all control
| + 178422 [sskim.box@gm] ...
| + 178657 [halostatue@g] Doubtful. I don't follow Pythonistas. However, if they are at all
+ 177910 [gbanfalvi@gm] I'm pretty much a newbie programmer so my opinion shouldn't count much
| 177920 [james_b@ne r] Same here.  My editor fills in the 'end' stuff for me, so there is no
+ 177962 [fritz.heinri] if a text is accidentally reformatted (alt-q in emacs, it seems to me
+ 178134 [matz@ru y- a] We are experimenting double semicolons as well as "end"s, so that you
  + 178139 [cameron.mcbr] I'm out of my league, but...
  | + 178141 [matz@ru y- a] No. The purpose of this experiment is hearing other opinions.  So
  | | 178145 [mental@ry ia] For what it's worth, I also strongly dislike it.  It was one of my least
  | | + 178150 [james@gr yp ] Amen brother.
  | | | + 178153 [gregory.t.br] +1;;
  | | | + 178165 [rossrt@ro co] +1
  | | + 178196 [lists@ha ff ] I was going to write my own post, but it seems MenTaLguY did it for me!
  | |   178200 [r.mark.volkm] I'm not a fan of the curly braces, but if we do end up using them, I
  | |   + 178206 [lists@ha ff ] Oh, I definitely agree here - I should have clarified.  I enjoy _matched_
  | |   + 178208 [hawkman.gelo] ...
  | |   + 178632 [lthiryidontw] def some_method = ->(args) {
  | |     178633 [ruby@an hr p] } >
  | + 178143 [jeff@sc wa c] ;; is used to end case statements in some popular Unix shells.  I have
  + 178140 [skilic@gm il] The semicolons, imho, aren't visible enough to the (my?) eye. I still
  | 178158 [nuby.ruby.pr] I agree. Although using semicolons sounded a good idea for me, when I
  | 178169 [furufuru@cc ] [. .  .]
  | 178175 [simon.kroege] (puts 'this'; puts 'that') if true
  | + 178195 [r.mark.volkm] I'll chime in and say that I also don't like the ";;" idea.
  | + 178259 [furufuru@cc ] Thanks for the suggestion.  That may be a good
  + 178168 [bob.news@gm ] - difficult to read especially with multiple "end"'s (as others have
  + 178323 [l.d.u.n.c.a.] I'm not the most experienced Ruby user, but for what it's worth one of the
  | 178491 [david@va ln ] Intriguing idea, but completely ad-hoc, and potentially confusing and
  + 178554 [snowzone5@ho] ooh, i like that.

Re: Time zone offset and daylight saving
177716 [gene.tani@gm] i have a note to check out this Olson tz dtabase but haven't gotten
177730 [banshee@ba s] My understanding is that a time change is implemented by switching time
+ 177758 [easleydp@gm ] Thanks for the help, guys.
+ 177876 [jamis@37 ig ] The TZInfo lib for Ruby does a pretty good job of encapsulating all
+ 177890 [trevor@pr to] Regarding "good luck figuring out when you're supposed to switch" -

FreeRide v1p19 glitch
177717 [newshoundat@] On Windows XP Pro, 1GHz, 512M

Re: How to get Skype user_status using Ruby on Rails.
177725 [karika.shah@] Thx Nic. :-)

Sqlite3 error on Mac OS X
177726 [danmunk@gm i] I am having problems with sqlite connectivy.  When I use the require
+ 177743 [fugalh@gm il] Is the problem in your database.yml file?
| 177793 [danmunk@gm i] That was my problem, thanks for your help.
+ 177873 [jamis@37 ig ] Note that 'sqlite' and 'sqlite3' are distinct. require 'sqlite' tries
+ 177883 [mariusfriis@] Did you install it using rubygems?

Re: find_all with hash table
177733 [bob.news@gm ] Dunno whether it's better in this case, but of course there's a solution

Testing Rails: problem running a Gruff sample
177737 [NoOne@No he ] I get errors when I try to run a Gruff sample for my WinXP/SP2 system and
177892 [rrajen@co ca] You need to have RMagick installed and configured.
178123 [NoOne@No he ] I didn't get a response in the first day after my post,  so I thought the
179398 [rrajen@co ca] I must have skimmed through this part of your post and did not pay
181017 [NoOne@No he ] I abandoned this for a while,  so I didn't notice you latest post.  I'll

methods defined in main
177738 [krishna.vive] I understand that everything in ruby is an object so a method defined
177744 [bob.news@gm ] The fact that self when printed shows "main" does not mean that there is a

Combining tags in URLs
177746 [vishy.v@gm i] I had seen an example on a blog entry about how to combine multiple

local variable and closure
177747 [uval@rz un -] below is one little script that fails at ### <<< line
177748 [bob.news@gm ] Without looking too close at your code: def has special scoping rules.
177750 [uval@rz un -] complexity was the intention of my code :)
177756 [bob.news@gm ] class Module

Newbie, looking for a library
177749 [eduardo.yane] ruby -e 'p $LOAD_PATH'
177885 [halostatue@g] require 'rubygems'

Re: Port a Library (#64)
177751 [amrangaye@gm] This is my first rubyquiz, and I am still learning Ruby. I decided to
177760 [amrangaye@gm] Soon after I posted this, I saw Rubyquiz #34 (Whiteout) and - much to

Test::Unit::Reporter help?
177762 [christopher.] I'm trying to integrate Test::Unit::Reporter with my little harness
177954 [alex@ve k. n] Replace this with

Rails + Oracle
177765 [sigzero@gm i] I have tried every connection string on the Rails site and it will not
+ 177894 [schoenm@ea t] Not sure what you're looking for. If you can connect to the database
+ 178049 [steven@lu os] Problem is, there are SO many ways to configure Oracle.  The following
  178314 [sigzero@gm i] I will try those but I believe I already have to no avail. I will try
  178315 [wilsonb@gm i] If all else fails, strip the newlines from a full TNSNAMES.ORA entry,

days in this month
177767 [michaelaugus] How to get int of how many days got this month ?
+ 177769 [jaco@ne tt a] You can look at the month_days method of the Time class.
+ 177773 [ara.t.howard] hth.
  177775 [michaelaugus] thank you that is what I need
threads.html
top