204596-207794

204456-207560 subjects 204882-239839

^ Ruby on WRT54G(L)
204596 [jim freeze.o] Has anyone installed Ruby on a WRT54GL router?
204607 [nahteecirp g] I would definitely be intrested in your results. Out of curiousity,
204616 [jim freeze.o] I'll be building an ipkg and putting it on the WRT54GL.
204667 [nahteecirp g] Oh, ok, I jurt assumed you might be doing this through a third party
204672 [jim freeze.o] Actually, openwrt. I've heard bad things about dd-wrt wrt the nvram state.
204682 [robert.dober] I guess that would just be hilearious, good luck and please, please let us

^ Manning Ruby/Rails contest
204602 [pat.eyler gm] Manning is running a contest:  If you make the winning entry, you'll
204823 [david.riccit] charset="iso-8859-1"
204825 [ellisdee gma] Ruby is to Rails as Chuck is to Norris

^ [QUIZ] Chip-8 (#88)
204610 [james graypr] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 204613 [james graypr] I know this quiz is a bit longer (to read) than we normally prefer,
+ 204627 [james graypr] It was just pointed out to me that I didn't attach the program.  You
+ 204669 [martin snowp] What's not specified here is that the opcodes are written to the file
| + 204710 [lukfugl gmai] I think you mean 1000 and 1002 in the description above. :)
| | 204724 [nahteecirp g] 1234ABCD5678
| | 204753 [lukfugl gmai] Ah, gotcha. I was thinking in instruction addressing, rather than
| | 204760 [nahteecirp g] Well it would be vaild, but indeed you would end up right in the middle of
| + 204732 [james graypr] I would think nils would be more likely to blow up with a problem in
+ 205053 [sander.land ] I implemented pretty much all the opcodes and used Tk to display the
| + 205064 [aleks0 gmail] Heres my solution.  I was more shooting for brevity of code than cool
| + 205182 [james graypr] You can also use HighLine for this.
|   205270 [sander.land ] I installed highline and checked the docs as well as the source and
|   205271 [james graypr] My apologies.  I misunderstood.
+ 205132 [mitchell koc] My solution for managing binary numbers was to make a new class
+ 205230 [adam.shelly ] My solution:  It's like a clone of my ICFP solution.  Where's the codex.chip8?

204623 [rxv hotmail.] does the colon operator have an anolog in say, Java or C++ ? It seems to be
+ 204628 [perrin apoth] I tend to guess you're referring to uses of the : character such as the
| 204635 [chiology gma] A simple way to describe it may be to look at it as a singleton object
| + 204640 [perrin apoth] I'm perfectly happy with "object-oriented symbol", but that might be
| | 204663 [dblack wobbl] I'd just call them symbols, or Symbol objects (just as with strings,
| | + 204666 [ara.t.howard] i like 'symbol literal' as in
| | | 204678 [perrin apoth] . . . except that doesn't point out the object-orientedness of it.  The
| | | 204684 [chiology gma] In my example, using a symbol would be the same as creating a symbol
| | | 204688 [dblack wobbl] Sorry, I'm not following.  What purpose would the hypothetical
| | | 204693 [chiology gma] Really as an example of its objectness. It's a way to look at the
| | | 204696 [dblack wobbl] You might as well save the round trip, though :-)  It's in the same
| | | + 204703 [chiology gma] Indeed. I understand that, just trying to illustrate it to those
| | | | 204708 [dblack wobbl] I see what you mean.  Symbols do seem to present problems -- they're
| | | | 204711 [nothinghappe] Well, that just makes it even *more* like Lisp than I was thinking.  It hadn't occurred to me
| | | | + 204714 [kevin.clark ] for my take on symbols.
| | | | + 204715 [dblack wobbl] eval(b)
| | | + 204713 [tom helmetst] => 23208408
| | + 204677 [perrin apoth] Even better -- more succinct, makes the same point.  Thanks.
| + 204662 [dblack wobbl] In the general case (i.e., unless you override Foo.new), x and y will
+ 204642 [sastph sas.c] Tokens that start with colon are called "symbols".
| + 204653 [chiology gma] Yep, that's about it, as far as I can tell.
| | 204657 [nothinghappe] Sorry if anyone's beat me to this, I find it hard to keep up with such a busy list...
| | + 204668 [dblack wobbl] Ruby symbols aren't exactly used as variable names, though.  If you
| | + 204790 [rxv hotmail.] Doesn;t that therefore make it the same thing as a reference in c++ ? -Ike
| | | 204797 [kmgaughan ei] No, because unlike a reference, a symbol doesn't actually refer to
| | | + 204815 [chiology gma] Think of a uniquely identifiable, primary key in a database. You would
| | | + 204980 [aleks0 gmail] As far as an analogue in other languages, I tend to think of symbols
| | |   205040 [dblack wobbl] True, but only if the method that uses them takes a symbol.  For
| | + 207296 [strobel secu] busy list...
| |   + 207605 [rick.denatal] And by the way the equivalent to
| |   + 207770 [strobel secu] I think I know :)
| |     207794 [toalett gmai] - Simen
| + 204789 [rxv hotmail.] Ok....so why not just use a String then, and test for equality of the values
|   204792 [dblack wobbl] Well... if they're not useful, then I don't think it matters whether
|   204852 [martin snowp] Note that for this particular use case - faster internal processing on
+ 204694 [kmgaughan ei] As mentioned elsewhere, Smalltalk and Lisp have operators which allow
+ 204791 [rxv hotmail.] No wonder this language is and has been taking off! Not only is the language
+ 207351 [toalett gmai] My take on explaining Symbols (from the "From other languages" page on
| 207376 [ngoc yahoo.c] Many persons use advanced language to explain Symbols to make it more
| + 207396 [paul plsys.c] What works for me is to think of a symbol as a uniqued constant (or
| + 207404 [nsmith5 umbc] There's (at least) one more key fact (which was hidden inside of the 'use
+ 207558 [pollak gmail] Ike,

^ XML2RB, day 2
204624 [erikveen gma] gegroet,

^ Ruby/Tk code critique
204632 [nbnntp1 ml1.] I have a bunch of Tk buttons tied to code. They're wrapped in an array
204745 [nagai ai.kyu] Probably, using bindtag' is not so bad idea.

^ Bug in ruby printf/sprintf
204644 [paul.dlug gm] I have encountered what appears to be a bug in ruby's printf/sprintf
204649 [jromano busi] The equivalent C program under RedHat Linux 3 update 6 x86_64 produces
204654 [paul.dlug gm] That's interesting. I just tried the same on linux (Gentoo) and you're
204843 [matz ruby-la] 0      The  value  should be zero padded.  For d, i, o, u, x,
204846 [leslieviljoe] print "|#{str.rjust(10, "0")}|"

^ find_all wierdness
204655 [oleg thework] book.chapters.find_all{ |chapter| !chapter.pages.empty? }.size
+ 204681 [kenosis gmai] Can you send any more context for your use?  I've used find_all on many
+ 205026 [dan-ml dan42] Try to use select instead of find_all. In this case I think you are actually
205541 [oleg thework] Thank you Daniel. That was it.

^ Finding "\" in a string
204665 [Eric.Armstro] I'm going crazy, right? Surely it is possible
+ 204674 [abergeron gm] => nil
| 204716 [Eric.Armstro] You would think so, wouldn't you? But note that
| 204719 [pbattley gma] That's right. The replacement string understands back-references of
| 204746 [Eric.Armstro] Very helpful. At least now I have a good idea that it
| 204752 [pbattley gma] However, in order to be able to produce a literal \1, it also needs to
| 204757 [logancapaldo] gsub(%r{\}) { '\\' }
| + 204759 [pbattley gma] s = "\\foo" * 1000000
| | 204765 [logancapaldo] I'm sure it is. I'll learn how to decipher backslashes in gsub when I
| + 204761 [Eric.Armstro] Omigawd. I'm more confused than ever! But
| + 204767 [Eric.Armstro] That's odd. I would have expected that to work,
|   204770 [logancapaldo] Sorry, that wasn't meant to be a _real_ example. It was just the idea
|   204776 [Eric.Armstro] No problem. If I had sufficient understanding, I would
+ 204717 [pbattley gma] You're not going crazy. You just need eight of 'em. Yes, really!
+ 204772 [w_a_x_man ya] \\foo\\bar
204774 [pbattley gma] Nice solution.
204778 [Eric.Armstro] I'll say! Wild! What makes /that/ work???
204784 [w_a_x_man ya] \& is simply what was matched by the regex.
204925 [Eric.Armstro] Too cool. I love it.

^ Custom Exception classes
204686 [clark.snowda] I'm new here so please be gentle (i.e. if I'm posting in the wrong place
204730 [vikkous gmai] The following works for me. If you have code that doesn't work, then
204935 [drbrain segm] Please don't subclass Exception as a plain rescue won't catch these.
+ 204952 [vikkous gmai] Ah, good point. Thanks for the tip; it hadn't occurred to me. I've
+ 205143 [sean.ohalpin] I'm sure that used to be the case but it must have changed around 1.8
+ 205144 [nobu ruby-la] AFAIK, it has never changed.
+ 205254 [drbrain segm] Are you sure?
205309 [sean.ohalpin] No - you're right. I keep getting this mixed up :/

^ calling a task in rant at any time (not just as a prerequisite)
204687 [jtprince gma] task :test => [:build] do    # calls :build before :test
204743 [Eric.Armstro] In Rake, I put the contents of the :myaction

^ Regex for whitespace plus vertical bar
204689 [robertlaferl] I am trying to quote arguments that have whitespace or a pipe (vertical
+ 204695 [dblack wobbl] irb(main):008:0> "abc|".index(/[\s|]/)
+ 204697 [M.B.Smillie ] matches a or b, where a and b are arbitrary regexes.
| 204758 [w_a_x_man ya] Not in a character class.
+ 204701 [jason.sweat ] $irb ^ Calling a dynamically generated Ruby script from a .rb 204691 [robertlaferl] I have a Ruby script that dynamically generates a Ruby script. I would + 204698 [chiology gma] require name | 204699 [chiology gma] Or, maybe, in the generated file, have the main bit of code you want | 204740 [chiology gma] Also, another option could be to call... | 204780 [caldridge gm] irb(main):002:0> load 'module.rb' | 205021 [robertlaferl] % cat rtest.rb | 205023 [decoux moulo] f.close + 205134 [interfecus g] Why not just eval the generated code? ^ Fwd: [UPDATE] RubyConf 2006 registration pre-info 204712 [jim freeze.o] On one hand, perhaps the hardcore, with their polling scripts and high 204806 [znmeb cesmai] Ah, but for performance, shouldn't you write the script in C? ^ [ANN] ZenTest 3.3.0 204720 [ryand-ruby z] ZenTest version 3.3.0 has been released! + 204804 [devlists-rub] gem install ZenTest | 204827 [devlists-rub] working now.. thanks! + 204834 [the.mindstor] [quote] 204856 [user domain.] Honestly, you should ! If you use autotest for more than 5 minutes 205148 [joevandyk gm] Say, how do I get the Rails view tests to be ran by the default rake 205255 [drbrain segm] Eric Hodel - drbrain@segment7.net - http://blog.segment7.net 206711 [robmnl gmail] This is awesome! As a daily autotest user, I immediately notice this :) ^ Puts bypasses access restrictions on to_s? 204726 [leslieviljoe] I read somewhere that "puts" calls "to_s" on an object to get a string + 204738 [khaines enig] irb(main):008:0> rs.__send__(:to_s) + 204741 [pbattley gma] Interesting question. I had a look at the C source, and it uses 204844 [leslieviljoe] That seems wrong! Not that you can bypass access restrictions, which I ^ RubyConf: Standard conference tactic. 204748 [Eric.Armstro] The organizers may already know about this, but ^ (none) 204779 [shodson gmai] matome 17 ^ Wild ideas: Finding a missing 'end' 204788 [schapht gmai] I was just reading a nuby question from the rails list and I had this + 204828 [wrecklass1 g] Yes, it has been considered. Unfortunately allowing the | 204858 [dblack wobbl] But surely just a warning can't be harmful, even if it mentions what | + 204860 [shevegen lin] I agree as far as giving the coder the exact error line in a better way | + 204861 [drnicwilliam] I think its better for it to guess than to just return the last line of | 204899 [masukomi gma] The problem with using indentation to even guess at an area in pretty much | 204900 [dblack wobbl] The solution could be to give a specific hint if it's a simple case, + 204910 [pbattley gma] Like this? ^ Re: Heredocs and white space 204795 [dblack wobbl] The thing is, the mechanism depends on an exact match. Here's an 204798 [dblack wobbl] Actually I don't think I answered your question. Looking at your 204810 [johnwilger g] Seems to be specific to the "<<-" notation. ^ Rails in Fink 204807 [rangerrick g] I went to OSCON this week, and after all the great stuff on RoR I just ^ Using http-access2 to get peer_cert 204813 [dsutch gmail] Is there a way to use http-access2 to obtain the peer's SSL 206718 [nakahiro sar] No choice but to use (awful) verify_callback. It must be doable. I'll ^ Debug history, a la irb/ext/save-history 204818 [the.chrismo ] Having just now stumbled across setting up .irbrc to store IRB history -- is ^ What method should a class provide for printf's %c format string ? 204835 [gerr41 shoom] #!/usr/bin/ruby 204845 [florgro gmai] I guessed that it would try to implicitly convert the object to an 204850 [gerr41 shoom] Yes, that was the solution, thank you very much. I must say it is a bit 205317 [logancapaldo] The rule for things like to_int, to_ary and to_str are basically if ^ How to md5 a file? 204838 [bjohnson med] Basically I want to generate an md5 hash from considerably large files + 204839 [bjohnson med] I neglected to include some neccessary details, sorry about that. | + 204847 [langstefan g] There are basically two options. | + 204881 [ssmoot gmail] I use the SHA1 digest for this since it's "more unique", so that gives + 205157 [interfecus g] I conducted a few tests to compare the performance of different + 205159 [rasputnik gm] Won't this return true for cases where the files are of different | 205160 [interfecus g] There's a separate check for file size. It checks first that both files + 205166 [vincent.four] =3CBR=3E Hello !=3CBR=3E=3CBR=3E=3E =3CBR=3E=3E I conducted a few tests= + 205167 [garbagecat10] I notice that MD5-generation is not twice as time-consuming as string 205172 [jan.svitok g] The choice of CRC32/md5/sha1 is a time/space vs false positive ^ Ruby comprehensive "slow" reference 204849 [leslieviljoe] I tried to find online explanations for the '%' and '?' operators used + 204854 [jan.svitok g] In fact, it's not an operator, it's an integer literal. + 204855 [alexandru gl] which may have references to other ruby quick refs as well, haven't ^ cgi vs. fcgi question 204853 [tallison tac] cgi = CGI.new("html4") 204909 [chiology gma] Or you could use another library, such as Builder or Markaby. 204927 [tallison tac] never heard of them. How do I install these? + 204928 [TimHunter nc] You are in for a treat. http::rubyforge.org is the home of both | 204938 [tallison tac] Looks like CPAN.org to me. | 204944 [james.britt ] Go to RubyForge and locate the rubygems library. There's a search field | 204995 [tallison tac] I started playing with this and ran into a lack of PATH (I guess). | + 205060 [james.britt ] Does your code include | + 205063 [TimHunter nc] You don't have to stumble around in the dark while waiting for some kind + 204929 [chiology gma] [sudo] gem install builder ^ keystroke logger 204859 [derekhaskin ] charset="iso-8859-1" 204919 [perrin apoth] This question looks awfully familiar. ^ build error on cygwin 204864 [uval rz.uni-] I am trying to install ruby1.8.4 204893 [znmeb cesmai] Do you just need Ruby on CygWin, or do you need to build it from source? 204894 [znmeb cesmai] Oops ... didn't see that. It looks like you don't have enough privileges 204932 [uval rz.uni-] actually I am logged in as administrator on XP + 204940 [nobu ruby-la] It occurs at compile time, not installation. The privileges + 204958 [wrecklass1 g] That's very odd. I've installed Cygwin with Ruby on several Win XP 204963 [znmeb cesmai]$ irb
+ 204964 [hal9000 hype] Try unsetting your RUBYOPT or installing rubygems (which has
| + 204965 [wrecklass1 g] I have seen that, and usually you need to unset RUBYOPT. The problem
| + 204971 [znmeb cesmai] Yep ... first undefine RUBYOPT, then re-install rubygems, then re-set
+ 204993 [uval rz.uni-] yes, this is what it says
205042 [znmeb cesmai] The fix was posted. What was happening on my system was that I installed

^ RUBY "for the rest of us"  conference   Was: About last night ...
`