275818-283348
275539-284407 subjects 275997-277709
^ Starting Threads
275818 [mcse palstek] I've many different threads to run parallel. Some of these have a
+ 275827 [globyy3000 h] Thread.new # Look up some uses for it based on what your doing.
| 275855 [vjoel path.b] It does: ruby's #sleep calls select() in that case.
+ 275844 [bbxx789_05ss] x = 1
+ 275878 [ara.t.howard] threads aren't quite that deterministic - you may find some without
^ how to use javascript in rhtml
275819 [advait.bellu] I needed to know a javascript function which I can use for focusing my
+ 275833 [scott spatte] If you are loading the prototype javascript library, you add the
| 275967 [advait.bellu] Thank you for looking into by problem, however the problem still
+ 275985 [bbxx789_05ss] Learn javascript, then write the code to do that. Or, hire someone to
275993 [advait.bellu] Thanks For the suggestion , But I better learn.......thank you once
^ [SUMMARY] Time Window (#144)
275820 [james graypr] I've said it before, and I'll say it again this time: I love the easy problems.
^ read write integer in binary into a file
275821 [acemtp gmail] I have some big files with lot of "unsigned int" (4 bytes) numbers and I
+ 275823 [phasis68 hot] SGksDQotLS0tLSBPcmlnaW5hbCBNZXNzYWdlIC0tLS0tIA0KRnJvbTogIlZpYW5uZXkgTGVjcm9h
| 275824 [acemtp gmail] fwrite(fp, 4, myint);
| 275825 [globyy3000 h] What file format? I dont see any problem with using Marshal, it doesnt
| 275826 [acemtp gmail] irb(main):036:0> mynum
+ 275832 [preble gmail] def pack_int32(n)
| 275836 [phrogz mac.c] Using only the number 2_000_000 seems to skew the results. I see your
+ 275834 [yermej gmail] Do you have to deal with each number individually? Maybe you could
+ 283346 [wujunchen gm] irb(main):001:0> f=open('test','w')
283348 [rmagick gmai] irb(main):001:0> x = [720850].pack('i')
^ Is this a Ruby bug in Dir on Windows?
275838 [wemagor2 gma] This was discussed on another thread, but I thought I'd ask the question
275918 [globyy3000 h] This is an educated guess, but i suspect it has to do with the way
^ Change a string to an integer, report an error if the string does not represent an integer?
275839 [rhkramer gma] Can anybody point me to a way to check if a string represents a valid integer
+ 275843 [stefano.croc] Kernel.Integer can convert a string to a number raising an exception if it =
| 275908 [shortcutter ] it has=20
+ 275845 [dblack rubyp] There's a method called Integer (uppercase I and all). It blows up if
+ 275858 [bbxx789_05ss] Integers can also have leading '+' signs. :)
275859 [bbxx789_05ss] invalid int
275863 [bbxx789_05ss] strings = ['0013abc', '0025', '-0030', '+051', '00-1', '-abc72']
275868 [dblack rubyp] Although....
^ Re: Change a string to an integer, report an error if the st
275840 [rabbitblue g] match = '000345'.match(/^\d+$/) # MatchData
+ 275842 [rmagick gmai] Check out Kernel#Integer
+ 275848 [diegoslice g] Integers can also be negative. Not sure if this applies to your case but
275860 [rhkramer gma] Thanks to all who replied!
275862 [lloyd 2live4] One caveat is that integers can have alpha characters in the string,
276171 [soren.anders] I usually use a quick and dirty hack to avoid regexps (though they're nice.
^ Advice sought on Installing Ruby 1.9 on OSX
275841 [rick.denatal] I gave in and got a macbook about a month ago, and I'm getting around
^ Need help understanding metaclassing
275853 [chris.czub g] I've been reading lots of Ruby tutorials trying to figure out
+ 275856 [dblack rubyp] The do/end sequence is a code block. Have a look at some of the
+ 275865 [rick.denatal] Wrong!
| 275874 [rabbitblue g] Hold on, now I'm confused. Given this...
| 275875 [rabbitblue g] cs.instance_eval do
| 275879 [chris.czub g] The method is put into the Creature class and is inaccessible in the
| 275881 [rabbitblue g] That's the same code as above. Still doesn't work though. =)
| 275882 [chris.czub g] Nope, it's c.eat instead of cs.eat... works for me! :)
| + 275894 [rabbitblue g] Hehe, I feel sheepish. (Yes, works for me, too.)
| | + 275900 [rick.denatal] No, your code did exactly that.
| | + 275903 [chris.czub g] user = DefaultUser.new
| | 275910 [chris.czub g] I don't really want to define it in the User class, because it might not
| | 275912 [olsonas gmai] class User
| | 275919 [chris.czub g] "You added a singleton method email and an accessor pair email/email= to
| | 276007 [olsonas gmai] Not really sure what you're asking here, but I can tell you what my code
| + 275898 [rick.denatal] Right.
+ 275871 [dblack rubyp] s/{/do/ :-)
^ [ANN] Ruby Changes in Leopard
275866 [laurent.sans] Leopard, Mac OS X 10.5, will very soon be available to everyone!
+ 275869 [fxrubyguy gm] Thanks for all the work that you've put into this, Laurent. Looks
| 275872 [lpackham gma] I didn't notice Apple had integrated the DTrace stuff as is. The only
+ 275904 [tim.pease gm] The wiki page says that "The gem_server utility is not part of the
| 275929 [marcel verni] As a side note, the latest RubyGems code moves the gem_server functionality
| + 275965 [rick.denatal] Apple's decision to restrict gem_server to the server version of
| + 275992 [laurent.sans] gem_server wasn't packaged in the client because it was decided at the
+ 275936 [rsanheim gma] Looks good, except I didn't see anything about how to upgrade ruby or
| + 275955 [dangerwillro] Uh, no.
| + 275996 [laurent.sans] Unfortunately no, sorry, but you should still be able to manually
| 276001 [ara.t.howard] i would humbling suggest that mac not follow the path tread but
| + 276025 [tim.pease gm] Hmmm, why not provide the XCode project files so that we can create
| | 276044 [dangerwillro] Arguably it should all be part of software management system.
| + 276132 [rich infoeth] charset=US-ASCII;
| 276139 [dangerwillro] boy you nailed that one on the head. They did it for them.
| 276143 [Bil.Kleb NAS] +1
+ 276675 [laurent.sans] We received many valuable feedback during the past days, thank you
^ What's in YOUR Ruby??? Could Ruby ever be a g.p. dev language?
275888 [TheOldCodeTo] I just finished my first 40+ hours with plain old Ruby (without rails
+ 275946 [znmeb cesmai] Pretty much anything I can. At the moment I'm seeing how tightly I can
| + 275991 [Joerg.Mittag] GemStone is going to port their kick-ass distributed, clustered,
| + 276901 [TheOldCodeTo] On Oct 25, 10:17 pm, "M. Edward (Ed) Borasky" <zn...@cesmail.net>
| 277026 [znmeb cesmai] Part of it is going to be on the RubyConf 2007 agenda -- to be
+ 275966 [dblack rubyp] Welcome!
+ 276364 [john.carter ] As one Old Fart to an Old Code Toad...
| + 276365 [znmeb cesmai] I haven't found that to be the case for the kind of data mining I do.
| + 276370 [bigboss64 ip] Having fun :-)
| 276420 [shevegen lin] Everything. Its my language for all tasks and I just laugh into the face
+ 276596 [dido.sevilla] T24gMTAvMjYvMDcsIENvZGVUb2FkIDxUaGVPbGRDb2RlVG9hZEBnbWFpbC5jb20+IHdyb3RlOgo+
^ ruby gems on ubuntu
275889 [MistryMan400] I can't get ruby gems to install.
275914 [globyy3000 h] instead of using setup.rb i would just do the following since u have
275926 [globyy3000 h] I apologize i also forgot to include that you need to run this before
^ cant seem to get system() & pipe to work together
275891 [dtown22 gmai] I am trying to run a command line utility which converts a wma file to
+ 275923 [globyy3000 h] I have no idea if this was intentional or not but...
| 275994 [dtown22 gmai] That commented line was a previous attempt at formatting the 'cmd'
+ 275999 [globyy3000 h] Alright lets approach this from a different perspective. First, the
| 276017 [dtown22 gmai] Thanks for taking the time to help me on this. I wasnt aware that
+ 276031 [yermej gmail] As far as I can tell, this is due to the way the Windows command
276055 [dtown22 gmai] I don't like the idea of relocating variables, as I would like this
276066 [globyy3000 h] Alright lets start this program over and build up from the basics using
276456 [dtown22 gmai] I wasnt aware of a wma to mp3 converter in ruby...i don't have time
276476 [yermej gmail] Just so you know, r2mp3 uses temp files for conversion so if that's an
276985 [dtown22 gmai] Just as an update, I ended up splitting the commands up into 2
^ Problem with attribute name
275893 [bakanon yaho] table named "translations". Translations has "id", "message" and
275895 [rabbitblue g] Did you design the model? When you see something like Message:0x4851f70,
275899 [bakanon yaho] "messages" and it's related with translations. Translations
275921 [bakanon yaho] definitely the problem is with the name, because if i put something
^ Garbled Email
275901 [shortcutter ] I seem to receive messages with garbled headers. Does anybode else
+ 275907 [aredridel nb] Seems to be me -- but I'm not sure what's up.
+ 276090 [stefan mahli] Empty subject line and body starting with
^ Skip the first invocation e.g. skip_first { foo }
275911 [lojicdotcom ] first = true
+ 275913 [gwtmp01 mac.] 3.times do |i|
| 275920 [lojicdotcom ] I guess I wasn't clear enough. This should work in any type of
| 275956 [shortcutter ] Of course there is also a solution with #inject. It can be abused when
+ 275916 [m_goldberg a] It's not entirely clear to me what you are trying to accomplish, so
| 275922 [lojicdotcom ] What I'm trying to accomplish is a convenient way to execute a block
| + 275927 [sean.ohalpin] I haven't figured out a way to avoid initializing outside the loop, but is
| + 275940 [m_goldberg a] Well, I'm pretty simple minded, so I would use a simple class to
| 275970 [lojicdotcom ] I think it's the least objectionable at this point :) It's just not as
+ 275925 [ara.t.howard] as others have mentioned you can use the block counter that's passed
| + 275938 [ari aribrown] Whoa! That's pretty intense! Can you please explain how that works?
| | 275939 [james graypr] It changes what the local variable block holds on the first call. So
| | 275963 [ari aribrown] Hm. I didn't know blocks could do that!
| + 275971 [lojicdotcom ] Clever :) I've used a similar technique in JavaScript, but I don't
| 275998 [ara.t.howard] it's just a building block... to generalize your idea, now that you
+ 275928 [list.push gm] arr = %w[foo bar bat foo]
| 275972 [lojicdotcom ] Correct.
+ 275935 [mortee.lists] # sets up a binding with a local variable _iteration = 0, and then
| + 275937 [ara.t.howard] that makes for a quite interesting syntax option if you chained a few
| + 275941 [botp delmont] # def skip_first(_skip_count =3D 1)
| | 275945 [mortee.lists] In the meantime I just realized that the binding of the block which does
| + 275974 [lojicdotcom ] So how do you pass the "real" block to the iterator then? The main
| 275980 [mortee.lists] Sorry, it wasn't clear to me by this whole thread but this last post
| 275984 [shortcutter ] Oh, that eluded me as well. In that case it's certainly best to just
| 275986 [mortee.lists] Thanks, this is nice - I haven't known it existed. However,
| 275995 [shortcutter ] Obviously tastes differ. :-) Personally I find the effort you have to
+ 275969 [lojicdotcom ] Thanks for all the feedback. My apologies for confusing many people
276447 [pit.capitain] module SkipN
+ 276463 [rick.denatal] Bravo!
+ 276530 [lojicdotcom ] Very imaginative - thanks for the post :) It has a problem that will
276795 [pit.capitain] Ah, but you didn't show us this use case yet, didn't you?
^ Re:
275931 [bob.yang.dev] when use `cmd` syntax, you still can get the process id of the executed
^ Ruby TK
275934 [wiz_pendases] i know im doing alot wrong, but i need all the help i can
276015 [williams.jay] Wow... You wern't jokin'
276018 [williams.jay] My mistake. I had never seen the attribures in the curley brackets the
^ a=Time.now;(Time.parse(a.to_s)-a)!=0
275942 [john.carter ] Hmm. Ooh yuck.
+ 275943 [alexg kuicr.] You can use YAML if you only want Time.
+ 275983 [o.renaud lap] It seems that Time objects are precise to the microsecond, but to_s (and
+ 275989 [ara.t.howard] though i prefer #iso8601 to #xmlschema because even typing the word
^ Ruby Radius Dictionary
275944 [aby_azid yah] Im trying to communicate with radius server using example file from
276037 [dusty.doris ] I'm using that library, I just ran a test and that file worked fine
276067 [aby_azid yah] may i know which dictionary you are using?
+ 276069 [aby_azid yah] I'm still new with radius protocol. Does the dictionary in radius client
| + 276105 [fwmailinglis] charset="us-ascii"
| + 276700 [dusty.doris ] The dictionary is there to map the code in the packet to a friendly
+ 276699 [dusty.doris ] I'm using the one that comes with the program, but I just have the
^ libxml-ruby namespace problem
275948 [mortee.lists] I'm trying to use libxml-ruby 0.5.2.0 on cygwin. The XML I want to parse
275949 [mortee.lists] Actually, libxml-ruby won't find what I'm looking for if either a
^ Re: State of the art in setup.rb land?
275952 [aaron tender] Check out hoe! It lets you create rake files which will build your
^ find all member in a class
275953 [bad_good_lio] how to find all members list(member functions & member variables for all
+ 275959 [shortcutter ] Do
+ 275960 [Paul.McArdle] irb(main):002:0> puts String.methods.sort
+ 275964 [rick.denatal] Note that unlike some languages with which you might be familiar,
276098 [hawat.thufir] the def is to define a method?
276100 [mrobert treb] Yeap "def" is to define a method
276118 [rick.denatal] Correct, it's an attribute reader with lazy initialization of the
^ whole class into a text file...
275954 [bad_good_lio] Is there any method or idea to get whole class into a text file ?
+ 275957 [AEtzold gmx.] Dear Pokkai,
+ 275958 [alexg kuicr.] alexg@alexgdell:~/Desktop$ cat r2r.rb
^ [QUIZ] Editing Text (#145)
275968 [james graypr] 1. Please do not post any solutions or spoiler discussion for this quiz until
+ 276426 [eric.mahurin] class StringCaret
| 276484 [gattster gma] Now that you've submitted a reference implementation, it looks much
| 276489 [eric.mahurin] Yes, I probably should have put something like this in the quiz to begin with.
+ 276582 [eric.mahurin] Since I haven't seen any solutions yet, I'd thought I'd elaborate on
| 276655 [james graypr] I'm willing to extend this quiz a week if that's what people want.
| + 276664 [eric.mahurin] I'm in favor. Another quiz during rubyconf may not be a good idea
| | 276673 [james graypr] Three votes is good enough for me. We'll add a week for this quiz.
| | 276692 [robert.dober] s/here/hear/
| | 276758 [bigboss64 ip] One Quiz I would love to participate in... If onyl I had the time.
| + 277056 [jgabrielygal] I'm sorry, I won't have time this week anyway (my second baby was born
| 277057 [james graypr] Congratulations on the new child!
| + 277427 [bigboss64 ip] Aye congratulations !
| + 277428 [bigboss64 ip] Aye congratulations !
+ 276731 [hmack.gm goo] First attempt
| 277308 [eric.mahurin] Thanks for the solution. One comment though. This solution is not
| 277344 [hmack.gm goo] you're right, I missed this point with my first solution. One simple way to
+ 276856 [eric.mahurin] Here is a strange solution of mine.
+ 277640 [matthew.moss] My solution is a deque... The text before the cursor is kept
| 277749 [eric.mahurin] I'm glad to see someone try an Arrays instead of a Strings. You'd
| 277792 [matthew.moss] Ten minutes after I posted my solution, I asked myself the same thing. =)
+ 277747 [eric.mahurin] In addition to the minimal functionality, I implemented a method that
^ Re: Editing Text (#145)
275973 [promos burch] James, thanks for putting all these challenges together, and thanks to
+ 275975 [james graypr] While I probably would have called it a caret as well, the term
| + 275977 [promos burch] Not out of line in the least. Without resorting to cheesey emoticons
| | 275978 [james graypr] Just to be clear, I didn't write that quiz. Eric Mahurin did.
| + 275979 [rick.denatal] Actually, I'd say that caret is a UI/View related term (its the name
| 276167 [eric.mahurin] Correct. I've also seen the term cursor being used with databases
+ 276000 [vjoel path.b] When the Macintosh first came out, the little blinking vertical bar in
^ Version of Ruby for Palm OS?
275976 [John.Joyce d] Does anyone know if a version of Ruby has ever been written to run on =
275987 [dangerwillro] Wow, another John Joyce here.
277235 [John.Joyce d] John,
277271 [dangerwillro] John Joyce,
277272 [mo_mail ongh] The Java for Palm is actually an implementation of J2ME - I'm not sure
277281 [dangerwillro] Yes, it seems we are a programmer's puzzle...
^ Getting namespaces from rake
275981 [christopher.] I am trying to automate the process of running all of the rake tasks
^ Overriding private methods
275990 [snacktime gm] So I'm hacking on rails and in activerecord there are two methods that
276041 [evan.moseman] If I understand what you are trying to do, this is typically how I do
threads.html
top