255634-256345
255414-262525 subjects 255810-257274
^ Characters and strings oddness
255634 [stefan.kruge] I'm trying to learn the language, coming from a long background in Perl.
+ 255637 [ z wzph.com] string[0].chr == 't'
| 255641 [gavin refine] or string[0..0] == 't'
+ 255665 [dan-ml dan42] How is that supposed to work? With the initial anchor there's no way
^ UPDATED: Building 1.8.6-p36 with Sun Studio 12 compiler
255638 [markea01 sbc] All -
255853 [ryand-ruby z] Please send reports like this to ruby-core, where they can make a
^ is self.var in a class the same as @@var ??
255645 [emmanuel lij] Is this the same?
255647 [robert.dober] No it is not, as a matter of fact the second idiom is not correct
^ Directory tree traversal fun
255649 [grblanco gma] I want to write a recursive file renamer. It will work such that given
255659 [ z wzph.com] def rename( headOfTree, what, withWhat )
^ Changing registry values with Win32::Registry
255651 [collintmille] I'm trying to change a registry value for an IPTV SDK
255699 [jan.svitok g] Win32::Registry::HKEY_LOCAL_MACHINE.open("SOFTWARE\\PATH_TO_KEY\\",Win32::Registry::KEY_WRITE).write("IgnoreTinyIFrames",Win32::Registry::REG_DWORD,0)
255710 [dejan.dimic ] Look at https://www.ruby-forum.com/topic/76585
255765 [collintmille] VGhhbmsgeW91CgpPbiA2LzE1LzA3LCBkaW1hIDxkZWphbi5kaW1pY0BnbWFpbC5jb20+IHdyb3Rl
^ severe newbie question (class, fixnum, array)
255653 [bladenut gma] I worked a lot in tcl, and this is my first day of trying something in
+ 255654 [onebitcipher] Perhaps you meant to write the following which would convert the number to a
+ 255655 [matthew.moss] I would say this is a bad idea, since I believe Thread is a core
+ 255656 [grblanco gma] a) it's to_s, as in @number.to_s
+ 255658 [florian.assm] First of all: http://whytheluckystiff.net/ruby/pickaxe/
255662 [bladenut gma] Ah, many thanks. Now it works. I should have thought about Thread
^ XLsuite | Open Source Ruby on Rails based ERP / CRM / CMS
255660 [djriel gmail] We are a small web development company in Vancouver, BC called <a
^ Reasonable practice?
255664 [transfire gm] It the following reasonable? How thread safe is it?
+ 255683 [bladeon gmai] If you just want to print out all of the members of an array, it looks
| 255692 [transfire gm] My example is a drastic simplification of what I'm actually doing. My
+ 255704 [robert.dober] Tom I do not know how big the chance is that the scenario above will
255832 [erwin.abbott] Robert's right, and I added another place threads might step on
255840 [transfire gm] Thanks Erwin, that helps. I was toying with not having any methd
+ 255847 [erwin.abbott] Yes, this is thread safe... each thread that calls #go gets its own
| + 255848 [erwin.abbott] I made a big mistake in that code. Instead of each instance of DooWop
| + 255851 [robert.dober] Hmm I am afraid that is impossible, there was a very recent discussion about it,
| + 255944 [transfire gm] I was thinking more along the lines of "transparent arguments". Here's
| 255968 [sonoflilit g] Wow, you're meddling in some pretty interesting things here. I don't
| 256042 [transfire gm] Does my FORTH love show thru? ;D
| 256044 [gregory.t.br] ...
+ 255940 [shortcutter ] X = Struct.new :ary do
^ lose the first character
255666 [bladenut gma] r = r.reverse.chop.reverse # remove the first character
+ 255667 [florian.assm] Check String.[] and Range
+ 255668 [dan-ml dan42] if you want to lose the first *character* try r[/./m]=""
| 255676 [vjoel path.b] Or, non-destructively,
| 255756 [dangerwillro] There are a million ways to do this in Ruby.
| 255758 [lists bertra] Obey at least some conventions.
| 255772 [dangerwillro] So sweet about it. What conventions do you refer to?
+ 255762 [transfire gm] Actually, I've been wanting a front version #chomp for a long time
255764 [sam powersou] I thought the pohc! was clever. But maybe left_chop and right_chop (or
^ Re: class destruction (evil genius metaprogramming)
255672 [rick.denatal] kermit.class.instance_methods(false).each{|m|
+ 255722 [dblack wobbl] Muppet.instance_eval { remove_method(m) }
| 255724 [robert.dober] or Muppet.send :remove_method, :m
| 255752 [dblack wobbl] If you have a method called "m" :-)
| 255754 [robert.dober] Ah I see :(, Probably 50% of my errors come from spurious ":" ARRRRG
+ 255753 [dblack wobbl] irb(main):019:0> s = ""
+ 255861 [dblack wobbl] I do sometimes wonder what would happen if the ancestry array were
+ 255884 [twifkak comc] You mean, like Object#become? :)
| 255895 [dblack wobbl] Not exactly. As I understand it, #become involves references changing
| 255949 [gregory.t.br] Would you want to be able to switch ordering too? I wonder what kind
+ 255888 [rick.denatal] Actually the ancestry array only exists as the return value of the
255910 [dblack wobbl] By making it writeable I meant making it an interface to the chain
^ ruby File#sysread
255673 [bladeon gmai] I am attempting to create a program that can transfer files. It so far
255674 [TimHunter nc] On Windows? "rb"
255679 [bladeon gmai] <.< >.> yes. I have no other choice. But yes, I was thinking it might be
255684 [bladeon gmai] Ahh, thanks. I've had little experience with the File class in ruby.
255936 [nobu ruby-la] It's an eternal curse against Windows programers. :)
^ load "file-name" question
255677 [dmoody47 com] This is my first post to this forum and I am a ruby nood who usually
255678 [dmoody47 com] EDIT
+ 255680 [bladeon gmai] Its looks good. I cant really see the problem. As far as i know
+ 255698 [alex blackke] I usually handle this by having a file 'test/boottest.rb' that looks
^ [ANN] Dhaka-2.2.1
255686 [mushfeq.khan] Dhaka is a parser- and lexer-generator. Ruby is both the source and target
255738 [anthonyeden ] Mushfeq,
^ Walking through Tate and Hibbs, running into things that don't work...starting on page 7
255687 [xcampanoli g] First of all, there seems to be this claim on page 7 that the contents
255781 [xcampanoli g] My next problem is the "greeting" page which I'm supposed to be able to
255789 [gregory.t.br] mailing list.
255792 [xcampanoli g] Okay, thanks.
^ Watir problem
255688 [sureshkumar.] I am working with WATIR. I can't control the security information pop
255716 [manish gslab] If you are using watir 1.5 checkout the dialog_test.rb in unit tests
256152 [sureshkumar.] Thanks manish. but i am using WATIR 1.4.1, where can i get WATIR 1.5. do
256170 [sureshkumar.] I have downloaded Watir1.5 from open QA site.when i invoke click_no_wait
256201 [jeff.fry gma] On Jun 19, 2:34 am, Suresh Kumar <sureshkumar.peru...@gmail.com>
^ str.scan
255689 [bladenut gma] I have a page of html, the usual thing. It has an ordered list. So it has
+ 255690 [peter rubyra] Colin,
| 255766 [gavin refine] Minor pedantic correction: .* is greedy (it grabs as much as it can).
+ 255703 [mick hollins] There are a number of them.
255706 [peter rubyra] and if you decide you need something advanced, you could check out
255774 [bladenut gma] stuff.scan(/<li>(.*?)<\/li>/).flatten
^ Log file doesn't show message
255695 [bombadil.tom] I'd like to have a logging function which either tells me that the text
255708 [florian.assm] I'm not sure what this code should do when it's finished but I
255713 [bombadil.tom] Great, thanks a lot! However, I just encountered a little bug -> I'd like t=
255714 [florian.assm] Add 1 to index when you choose the filename...
+ 255721 [bombadil.tom] Not that easy I'd say as I now have Bugtraq ID: 5, but 1.txt :-)
+ 255728 [bombadil.tom] Florian,
255732 [florian.assm] I'd subscribe the maillist or use a webservice if it exists, otherwise
255736 [bombadil.tom] All right. Lastly, it pretty much seems like it's not that easy as I now ge=
^ Create text files...
255700 [bombadil.tom] I do have a text file as shown below. I'd now like to use Ruby to create
+ 255709 [AEtzold gmx.] Dear Tom,
+ 255755 [Reid.Thompso] not ruby, but...
^ How to set the timeout attr when using open-uri to open a url.
255702 [yedingding g] I met a problem using open-uri.
255705 [pergesu gmai] You can use the timeout library.
255739 [yedingding g] Yes, i know that. Thanks. :)
255883 [rick.denatal] Where did you see a read_timeout option? I can't find it in any
255892 [yedingding g] Oh, sorry, it's my mistake of careless.
255906 [rick.denatal] Well I must have missed where you said that you were using 1.9. <G>
^ [Solved] Dir copy with rename
255717 [Gilbert.Rebh] finally with your help and the snippets of another thread =
255718 [Gilbert.Rebh] a small improvement to get files renamed also, as
255719 [Gilbert.Rebh] should have been, read as=
^ rar gem!
255720 [bashar.ayyas] I'm building an application to compress and uncompress files and this
255727 [alex blackke] This came up a little while ago - you're best off calling unrar.
^ wite an integer to file as binary
255723 [james dimsum] Simple problem but I'm not sure of an elegant solution, I can do it but
+ 255726 [robert.dober] A first idea - not tested - would be something like this
+ 255729 [alex blackke] File.open('output.bin', 'wb'){|f|
| 255730 [james dimsum] Thanks, thought the only way was to but it into an array, my syntax
+ 255734 [anthonyeden ] Take a look at the bindata gem for all your binary needs. I've used it
+ 255780 [dangerwillro] This one is always a stumper.
| 255971 [rick.denatal] Except that the OP was looking to write the integer as 4 binary bytes.
| 255973 [dangerwillro] Oops! I missed the part about 4 binary bytes. Sometimes the inbox is
+ 256025 [james dimsum] Gahhh wish I'd heard of bindata gem a few months ago, now I feel like
^ anybody help me
255725 [mahen.1981 g] i want to open outlook thro my HTML using ruby code(onclick of submit
255731 [has.sox gmai] I don't believe this is possible, since your restricted to HTML or something
255777 [onebitcipher] That sounds like a scary intrusion into a users data. Why on earth would
^ Ruby Nube
255733 [a.paranoid.a] The concept of Dynamically Typed Languages has peaked my interest.
+ 255735 [shortcutter ] Often scripting languages are dynamically typed, but there are others as
| 255785 [vasudevram g] that is related to the clean syntax and powerful functionality or to
+ 255779 [dangerwillro] Dynamic typing itself is not such a big deal, but it does mean less
| 255783 [shortcutter ] While I agree to the rest I would not attribute this example to dynamic
+ 255786 [garbagecat10] Dynamic typing is based on the intuition that the language system itself can
^ [QUIZ] Verbal Arithmetic (#128)
255737 [james graypr] 1. Please do not post any solutions or spoiler discussion for this quiz until
+ 255740 [kazaam oleco] I really don't get it :) How did you figured out that 2 = y in your example?
| 255741 [james graypr] Well, a non-clever way is to try an exhaustive search of each digit
| 255743 [kazaam oleco] ohh I totally misunderstood the task here.. I thought the input would be
| 255745 [sam powersou] For perhaps a reason to change the wording, that's what I thought as
| + 255747 [james graypr] Sorry for the confusion folks. You get both sides of the equation
| + 255748 [robert.dober] Hmm maybe this helps to clarify (for emacs users) the problem is like
| 255770 [jameskilton ] send
| 255788 [warrenb aqui] Jason,
+ 255912 [aurelianocal] ./quiz_128.rb "a+b=c"a: 5b: 1c: 6
| + 255915 [bulliver bad] I think about 12 hours from now...
| + 255952 [aurelianocal] Well, I think I can send it now. My implementation is onhttp://pastie.caboo.se/71198.
+ 255948 [rrafje gmail] Here's my solution: http://pastie.caboo.se/71188
| + 255959 [hmack.gm goo] here is my solution for the arithmetic quiz. I am a ruby beginner and this
| + 256120 [james graypr] #!/usr/bin/env ruby -wKU
| 256199 [moderated so] On Jun 18, 4:59 pm, James Edward Gray II <j...@grayproductions.net>
| 256208 [james graypr] Thanks. There have been far more clever submissions though.
+ 255997 [justin.ethie] At the outset, I had no idea how difficult this problem would be. In fact,
+ 256029 [Glen.F.Panko] #! /usr/bin/env ruby
+ 256047 [m_goldberg a] Here is my solution for Ruby Quiz 128. It's a little rough, but I
+ 256145 [m_goldberg a] Sorry for the second post, but I just noticed that I pasted a wrong
+ 256221 [ruby-talk lo] This solution requires Gecode/R[1] 0.2.0 (need to install Gecode[3,4]
| + 256237 [ruby-talk lo] The last part is probably a bit misleading/incorrect. We are not
| + 256345 [ruby-talk lo] I forgot a node in the middle there (since there are 4 nodes). The
+ 256272 [showaltb gma] Here's my solution: http://pastie.caboo.se/72030
^ Abstract interfaces as a means of documentation
255742 [eliben gmail] The issue of abstract interfaces has been discussed extensively in
255790 [gavin refine] 4) Create a Module and document the method in the module, and then
255808 [eliben gmail] Is this really different from declaring JumpingClimbingPlayer as a
255822 [gregory.t.br] Yes. Modules cannot be inherited from or instantiated.
255845 [eliben gmail] Understood, thanks. Another thing - say that for some reason I want my
255870 [gregory.t.br] module B
^ JRuby+require in ant, was [Solved] Dir copy with rename
255744 [Gilbert.Rebh] if someone else runs into that ...
255746 [nicksieger g] We do build and distribute a jruby-complete jar, just not through the
^ Re: How to set the timeout attr when using open-uri to open
255751 [roseanne jav] open(name, *rest, &block)
^ Dynamic Class Initialization
255757 [peer canadad] I know this can be done, but I can't find out how to do it. I have a
+ 255759 [ecomba mac.c] clazz = Object.const_get("Product")
| + 255763 [peer canadad] Thanks all. I knew this couldn't be that difficult. I must have been
| + 255768 [Rob AgileCon] # from Jim Weirich (based on email correspondence)
+ 255761 [farrel.lifso] class = "Product"
+ 255769 [Daniel.Kempk] def constantize(camel_cased_word)
| 255879 [ryand-ruby z] % irb
| 255880 [Daniel.Kempk] Wow, okay. I didn't know about that.
+ 255843 [gpygood 126.] product=eval("Product").new
^ Using extend for initialization settings?
255760 [transfire gm] It's not uncommon to see initialize method take a hash or a setting
+ 255771 [gregory.t.br] Side by side, I have to say the former is clearer than the latter, and
+ 255784 [shortcutter ] irb(main):001:0> require 'ostruct'
| 255797 [transfire gm] Hmm... I think maybe my point is being missed. The goal is to
| + 255798 [gregory.t.br] class Foo; end
| | 255800 [robert.dober] Hmm control maybe, you are not forcing anybody to call
| | 255801 [gregory.t.br] Then just pass the constant into the constructor :)
| | 255806 [robert.dober] Huh.. that is exactly what I have suggested, right?
| | 255826 [gregory.t.br] Right. I was basically saying you don't need to_module because if you
| | 255830 [transfire gm] #to_module is just a convenience so one can pass in a container module
| | + 255833 [gregory.t.br] I understand what it's for, I just don't think it's very useful.
| | + 255852 [robert.dober] Thanks for the clarification, I thaught it was part of the concept and
| + 255802 [shortcutter ] Actually your code is about initializing an instance - not a class.
| 255837 [transfire gm] Attrsibutes would have precedence with how things work now. But that
| 255839 [transfire gm] Sorry. I was thingk of #include, not #extensd. So scratch that ...
+ 255834 [dan-ml dan42] The behavior is substantially different. With hash initialization,
^ Info regarding Zlib::GzipReader
255767 [ondemannen g] I'm trying to parse through a gzip'ed proxy access log with
^ nube soap::mapping::object question
255773 [brking gmail] I've been banging my head against the wall on this problem. I have a
255855 [nakahiro sar] Can you show me a sample response XML? I don't understand 'empty element'.
^ mystery deepens
255776 [grehom ntlwo] To further confound me I tried the ruby rails turtorial and to my
^ (none)
255787 [hraducan gma] unsubscribe
^ ruby in cmd
255791 [einaung yaho] I am new to Ruby and am trying to run a piece of code from Programming
+ 255793 [Daniel.Kempk] You need to put a puts/print in front of everything you want to output.
+ 255794 [a.r.ferreira] As there is no print/puts/etc. statement, this non-output is expected
| 255795 [maung atc-on] That's explained it. Thanks a lot. It saved me a lot of time.
+ 255796 [chris.hulan ] To see the output, you have to put it out 9^)
^ test to see if a variable exists
255803 [bladenut gma] So I am stealing all these identities and storing everything in a big
+ 255807 [pdanese Rib-] So I am stealing all these identities and storing everything in a big
+ 255809 [gavin refine] Arrays (and Hashes) in Ruby are sparse - they only store the values
+ 255816 [m_goldberg a] Using a hash is the way to go here. You've already been advised to do
255865 [dangerwillro] 377-23-4736 (not a real one)
255882 [m_goldberg a] I don't doubt that Identity objects could be indexed into some kind
^ Facets Units. How do I use it?
255805 [frioux gmail] I am trying to use the facet units and I am having no luck. If I do
255815 [calamitates ] => nil
255819 [frioux gmail] Ah! Brilliant. I had forgotten about that. In my irbrc I defined a
255821 [calamitates ] The exchange rates are not actually the reason for the slow start-up
255828 [frioux gmail] Thanks for the tips! I'll look into it for sure. I think that the
255829 [calamitates ] You need to include the Units module first (this is to prevent
255841 [transfire gm] A new version of Units will be out in a week or two as part of Facets
255908 [frioux gmail] Thanks much, I will definitely check that out.
255930 [transfire gm] Good idea. Will put it on the TODOs.
threads.html
top