356452-358644 subjects 356812-359462
add some content to a file
356618 [rubynewbee@g] I want to modify a file, begin from X line (X is line number),
356622 [shortcutter@] Inserting is hard - because you have to move all the content behind that
Employee motivation in the software industry
356621 [stefan.kirya] I am doing a research about motivation in software development, the
356632 [wood_yee12@h] a program where I type the area code, hit enter, and see it's state. I
+ 356676 [marnen@ma ne] Use a database (if this is a desktop application, SQLite would work
+ 356682 [gwtmp01@ma .] There are lots of ways to do this. Maybe this script will give you
ANN: Ruby 1.8.6 pl399 released
356639 [wyhaines@gm ] Ruby 1.8.6 pl399 has been released. This release fixes a problem that
+ 356641 [wayneeseguin] Awesome turnaround time Kirk!
+ 356651 [dan@te en .n] Forgive my ignorance, but why would one want to use this instead of
| + 356654 [wayneeseguin] Dan,
| + 357730 [wyhaines@gm ] Dan, Wayne basically covered it. It's support. Where one has an
+ 357721 [rogerpack200] Any chance you could email James Gray with the news so he can post a
Re: Process id
356642 [rogerpack200] So you want something like "lookup some other ruby program's PID"?
356644 [djberg96@gm ] Presumably, in which case you want sys-proctable.
[ANN] johnson 2.0.0 prerelease 0
356648 [smparkes@sm ] johnson version 2.0.0.pre0 has been released!=20
JRuby rake not working!
356653 [hypermeister] I am trying out Rails using JRuby. I set up a Rails app using
356658 [nicksieger@g] Could be a number of things, PATH environment variable, bug in JRuby
356675 [hypermeister] I was solve to do the migration by explicitly specifying the path of
358623 [headius@he d] I concur with Nick...something's strange about your PATH
eval and implicit passing of blocks
356659 [peter.mclain] I'm trying to understand if/how/when/why Ruby implicitly passes
weird action of 'nokogiri' library on Snow Leopard
356661 [juneng603@gm] cut the introduction.. here is my situation on the snow leopard.
+ 356664 [ben@bl yt in] Most likely because you do not require rubygems in your script. Snow
| 356670 [juneng603@gm] On 2=BF=F96=C0=CF, =BF=C0=C0=FC3=BD=C343=BA=D0, Ben Bleything <b...@bleythi=
| 356671 [ben@bl yt in] Because that is how it works :)
| + 356678 [juneng603@gm] On 2=BF=F96=C0=CF, =BF=C0=C0=FC4=BD=C325=BA=D0, Ben Bleything <b...@bleythi=
| + 364097 [jovemark@gm ] May i seek your help for captioned case ?
+ 356667 [hassan.schro] require 'rubygems' # missing this :-)
Fastest way to iterate over a range in steps
356662 [astounding@g] What's the fastest way to iterate over a range in variable increments?
356677 [shortcutter@] robert@fussel:~$ ruby19 xx.rb
356679 [transfire@gm] Might consider how #succ plays into this as well.
356706 [shortcutter@] Good idea!
356710 [transfire@gm] not
356715 [shortcutter@] Why? All method bodies did not do anything (apart from while's which
356717 [transfire@gm] Rehearsal --------------------------------------------------
356825 [shortcutter@] robert@fussel:~$ allruby xx.rb
function lookup in ruby
356663 [opti900@gm i] I was wondering what happened in the background of following snippet.
+ 356668 [gwtmp01@ma .] At this point the only thing named 'v1' is a method
| 356681 [opti900@gm i] Thanks Gary and Aaron. I understand it now.
+ 356669 [astounding@g] At this point, since you ONLY have method/function named 'v1' defined,
[ANN] envjs rubygem 0.1.1
356672 [smparkes@sm ] envjs rubygem version 0.1.1 has been released!=20
+ 357207 [ed.howland@g] Thanks,
| 357211 [smparkes@sm ] No, it doesn't. It's pretty dependent at this point on C extension stuff =
+ 357208 [ed.howland@g] Works great if you change
357210 [smparkes@sm ] Fixed. Thanks.
Google AI Challenge at U of Waterloo
356685 [mentifex@my ] Contest runs from 4 February to 26 February 2010.
+ 356686 [imuaplease@g] I find out that
| 356691 [andrej.mitro] Sweet, something to keep my brain busy for the next couple of weeks.
+ 356692 [nagle@an ma ] Ignore. Well-known nut. See "http://www.nothingisreal.com/mentifex_faq.html"
| 356695 [marnen@ma ne] That was unnecessary. Whether or not he's a nut, the challenge he's
+ 356693 [toylet.toyle] It's definitely *not* exactly a programming challenge, but algorithm
+ 356699 [cameron.jp@g] On Feb 5, 11:18pm, "Man-wai Chang to The Door (24000bps)"
| 356709 [toylet.toyle] Someone please dumb the Tron ROM from the MAME32 project and use it as
| 358575 [mentifex@my ] Google AI Challenge post-mortem report by the winner is at
+ 356700 [no.email@no ] Eh? Just about every interesting programming challenge is mostly about
356708 [toylet.toyle] Everyone back then has abused the "programming" word to meant doing
OS X/Snow Leo - Specify custom executable location for build/install for 1.9
356688 [tmo1138@in a] Been searching via Google but nothing immediately pops up.
356694 [unbewusst.se] AS_HELP_STRING([--with-baseruby=RUBY], [use RUBY as baseruby;
356696 [ryand-ruby@z] install
356711 [tmo1138@in a] Thanks, Ryan. After updating my Readline library to version 6.0 I was
Can ruby do a repeated Reboot test script
356697 [hamid_rasoul] Just want to write a ruby script that reboots the computer for 10
+ 356698 [jeffpeng@ne ] 在 2010-02-06六的 17:52 +0900，Ham Baba写道：
| 356826 [dan@te en .n] If you put the staus file in /tmp, make sure your system doesn't clear
| 356995 [jazzezravi@g] Step 1 --> Create 1 text file like
| 356996 [jazzezravi@g] I have missed to mention step 5 in previous conversation.
+ 356702 [markhobley@h] Ensure that your system is configured in such a manner that members of
356703 [eleanor@ga e] rebooter
356729 [ian.hobson@n] I'm astonished that the system reboot command does not do this!
356731 [eleanor@ga e] status file and sync the filesystem before performing the reboot :)
356739 [ninja@sl ph ] I guess it depends on the system you're on -- when I type 'reboot', my system
wxFormBuilder for wxRuby question
356704 [hypermeister] I want to design a GUI with wxRuby, but I don't want to define it in
356712 [bosko.ivanis] do
356737 [hypermeister] interface, but... can I save it to .xrc format? The "Generate Code"
356705 [juneng603@gm] now, I wanna call some functions in A site that was already
356713 [ibc@al ax ne] But this seems a RubyOnRails question, so please ask in RoR maillist/forum.
match/scan does not return multiple matches
356716 [hramrach@ce ] I tried scanning for multiple occurences of a group in a string and
+ 356718 [ralf.mueller] as far as i know, nested groups are not allowed. regular expressions do
| + 356722 [hramrach@ce ] Actually they are allowed, otherwise I would not get a match at all.
| | 356723 [ben@bl yt in] Even so, I still think that there is a bug in your regex. I can't
| + 356824 [shortcutter@] I would only use #split if you really want to split the string.
| 356916 [ralf.mueller] Sorry, I mixed grouping and capturing. Concerning grouping, regexp acts
| 356946 [hramrach@ce ] Actually, nested capturing is also supported as you can see from the
| 356949 [ben@bl yt in] Are you sure it matches multiple times? As I mentioned earlier in the
| 356951 [hramrach@ce ] (stuff)+ matches multiple stuffs but returns only one.
+ 356724 [b.candler@po] But the regular expression you're passing is anchored, so the entire
356726 [rick.denatal] Well I think that I understand what the OO is saying, let's break the
356728 [hramrach@ce ] Thanks for the explanations. As mentioned on the page and also
[ANN] TMail 1.2.7
356740 [raasdnil@gm ] Even though I am going full speed ahead with the Mail gem, TMail still
[ANN] mechanize 1.0.0 Released
356742 [aaron@te de ] mechanize version 1.0.0 has been released!
356743 [ryand-ruby@z] websites.=20
Honest opinion needed...
356744 [schalaalexia] I've been trying to find a scripting language to integrate into a game
+ 356745 [stfairy@gm i] Limiting the use of dynamic features of ruby will lead to better
| 356748 [usurffx@gm i] Dynamic features are the reason for scripting in games, no need to care
| 356765 [schalaalexia] Well I planned to implement the game's elements (classes for NPC, spell,
+ 356779 [billk@ct .c ] I'd say it depends a lot on how consistent your framerate needs to be.
| + 356781 [schalaalexia] Hmm... That would be a good mechanism for Ruby. Unfortunately I don't
| | 356789 [billk@ct .c ] They are already aware of the possibilities, but there are trade-offs.
| + 356790 [ninja@sl ph ] It might be a bit heavyweight, but if your game is written in Java, JRuby
| 356798 [schalaalexia] I love that idea! Thanks!
+ 356844 [usenet-nospa] It is intentionally low-level, but really, it's not bad.
| 356876 [schalaalexia] Well I mean I read chapters 24 to 29 of Programming in Lua 1st Edition
+ 356877 [tony@me io .] Ruby has a C embedding API? First I've ever heard of that.
356890 [tony@me io .] As a follow up: Rubinius, an alternative Ruby virtual machine written in
356894 [schalaalexia] I took a look at Rubinus and it doesn't support Windows, my primary
356899 [tony@me io .] Honestly if you're looking for a language which embeds easily into C/C++
Symbols and class veriable
356747 [imran.nazir@] example, if I declare the variable @red_car_speed is this aliased or
+ 356754 [xenogenesis@] @variable_name is an *instance* variable, not class variable. They are
+ 356758 [marnen@ma ne] No.
+ 356770 [albertschlef] @something and :something aren't linked.
+ 356771 [albertschlef] And note that you've sinned here. You didn't keep correct indentation.
356749 [dv@vo lk rt ] I'd like to implement a standalone application using
356752 [marnen@ma ne] The video tutorials at the Rubyforge site are current and informative.
356755 [dv@vo lk rt ] Mmm, I seemed to be blind eyed. At the rubyforge site, I can' find any
+ 356757 [marnen@ma ne] Oops! I did mean monkeybars.org. Sorry.
+ 356766 [marnen@ma ne] I'd say so. :)
+ 356768 [dv@vo lk rt ] You are right ,) Damm it, it didn't see this. Thank you very, very much.
+ 356777 [james.britt@] Are you sure the version of Monkeybars in these videos is *recent*?
356778 [marnen@ma ne] Of course I'm not certain. But it's recent enough that things still
Issue during multiple calls to C embedded Ruby with dlopen
356750 [david.marcha] I try to embed a Ruby interpreter into an application through a shared
[ANN] DNote 1.1.2
356753 [transfire@gm] DNote v1.1.2
356759 [ibc@al ax ne] $ dnote .
same character show different code in two machine
356756 [sunraise2005] one chinese character show different code in two different machine.
+ 356762 [xenogenesis@] Are the two machines getting the text from the same source?
| 356780 [sunraise2005] Are the two machines getting the text from the same source?
| 356795 [walton@vy er] irb(main):001:0> "Hello".encoding
| 356799 [sunraise2005] Thanks, Walton,
| 356817 [marnen@ma ne] No, I don't think that method exists in 1.8.
+ 356808 [b.candler@po] In hex those are: \xa3\xa4
356823 [sunraise2005] Thanks Brian, see my in line comments.
356831 [b.candler@po] Sorry, I have no idea. Are you sure that \xa3\xa4 correponds exactly to
356833 [sunraise2005] I have no idea either, but I will upgrade to ruby 1.9 to leverage
Re: DNote 1.1.3
356760 [transfire@gm] FYI. Just pushed out 1.1.3. There was a bug 1.1.2 where the binary was
Re: DNote 1.1.2
356761 [transfire@gm] no
356764 [ibc@al ax ne] =2D-=20
356767 [transfire@gm] Thanks. Basically reiterates what I already knew. But reading it again
ANN: RubyInstaller - Release Candidate 2 - 1.8.6, 1.8.7 and 1.9.1 released
356763 [luislavena@g] I'm pleased to announce the second Release Candidate of the latest
C embed assistance
356769 [schalaalexia] I was wondering if there was a site with reliable documentation covering
+ 356773 [unexist@do f] The word 'reliable' is a bit problematic in this case, no docs I found
| 356776 [stfairy@gm i] I think the book Programming Ruby 1.9 from the pragmatic programmers
| 356782 [schalaalexia] I guessed that much. I mean if a language can be extended by C, C should
| 356809 [unexist@do f] Inconclusively, I started embedding with 1.8.6 and it was fun to tinker
| 356875 [schalaalexia] How so?
+ 356806 [b.candler@po] This one?
+ 356878 [tony@me io .] Unless there's a magic API I'm not aware of, Ruby doesn't have anything like
+ 356895 [schalaalexia] You know... I was considering right now about using C# instead of C/C++.
+ 356897 [usenet-nospa] I would not consider C# to be portable past Windows, which for me would
| 356900 [schalaalexia] MFC, Win32, and DirectX have been around for a while, no?
| 356905 [usenet-nospa] Win32 is old news, it's been .NET for a while. Before that it was OS/2 that
+ 356898 [tony@me io .] I hear IronRuby's fairly good (i.e. Ruby for .NET), and it would make
| 356902 [schalaalexia] Nice! Uhm... I used Allegro (http://alleg.sf.net) for my gaming API, and
+ 356998 [marnen@ma ne] Use something portable. It will make it easier to provide other
Rescue Block does not work
356772 [bvishny@gm i] I am using a begin.. rescue.. else block to catch a timeout and try
356774 [ibc@al ax ne] Are you sure which is the exact exception raised?
356775 [bvishny@gm i] My mistake. I originally had a generic rescue clause without the
+ 356783 [ibc@al ax ne] Yes.
| 356788 [ibc@al ax ne] Sorry, I was wrong as just StandardError inherit exceptions are rescued.
+ 356784 [matz@ru y- a] The rescue clause without explicit exception class catches any
356785 [bvishny@gm i] Matz,
356786 [matz@ru y- a] On 1.8, Timeout::Error is a subclass of Interrupt, which is NOT a
356787 [bvishny@gm i] Matz,
356797 [matz@ru y- a] For the record, on 1.9 Timeout::Error is a subclass of StandardError.
confused about the superclass
356791 [rubynewbee@g] irb(main):001:0> class Myclass
+ 356801 [shortcutter@] Why?
+ 356803 [josh.cheek@g] class MyClass
| 356804 [shortcutter@] Exactly! You have the most important point at the end of your
+ 356807 [b.candler@po] All classes inherit from Object unless you give a different superclass.
Why no ++ and --?
356792 [sonja@ki a. ] "foo += 1" somehow seems less elegant or pretty as "foo++".
+ 356794 [billk@ct .c ] Regards,
+ 356818 [marnen@ma ne] The short answer is that it doesn't fit with Ruby's object model, and
+ 356838 [tony@me io .] matz doesn't want it, most rubyists don't want it (and even actively oppose
+ 356845 [usenet-nospa] Yes.
| + 356846 [aldric@tr vo] You know, I really thought the Ruby Way (tm) embraced, nay, espoused
| | 356848 [marnen@ma ne] ...which doesn't work when intentionally invoked. What are you, some
| + 356847 [tony@me io .] Not to beat the dead horse any more but...
| 356850 [Rob@Ag le on] begin; _tmp = x; x = x.succ; _tmp; end
| 356853 [tony@me io .] Good luck implementing that one.
+ 357273 [cmdicely@gm ] "foo += 1" doesn't have the same meaning as "foo++", instead, it is
| 357288 [josh.cheek@g] In C++, outputs "ref1 = 6 , ref2 = 6" Because ++ changes the underlying
| + 357291 [josh.cheek@g] I thought it might be interesting to see how Java handles this, since it has
| + 357396 [tony@me io .] Sorry to flay the dead horse's sun-bleached bones a bit more, but...
| 357428 [minilith@gm ] I find that issue interesting in a slightly different perspective.
| + 357439 [usurffx@gm i] I don't think there is any problem in implementation, but choosing a
| + 357454 [marnen@ma ne] No. The mechanics of assignment in Ruby are such that ++ is simply not
| + 357462 [tony@me io .] ++ and -- modify their receivers. Since Ruby's Numeric types are immutable,
| | 357465 [minilith@gm ] able,
| | 357470 [usenet-nospa] I don't think allowing references or pointers to variables would be good.
| | 357472 [fxn@ha hr f.] Don't agree with that. For me the contract is just about the variable.
| | 357475 [usenet-nospa] ++*p;
| | 357479 [fxn@ha hr f.] *p += 1;
| | 357483 [tony@me io .] obj.meth += 1
| + 357469 [usenet-nospa] I don't think so, no more than it points to a shortcoming of Ruby that
+ 357404 [usurffx@gm i] Just think about "a ++ -- - ++ -- b".
+ 357484 [aldric@tr vo] foo+=1 follows the POLS.
356802 [shortcutter@] despite the traffic I am seeing on the mailing list side the news side
356816 [james@gr ys ] Yes, it looks like our attempts to copy messages to Usenet are running =
356830 [shortcutter@] Now I am seeing your post (and others as well) on the news side.
356835 [fred@la av .] The news server lost its system hard disk during the week-end (and, of
356837 [james@gr ys ] Thank you Fred. We appreciate you keeping us going.
356867 [shortcutter@] Absolutely! Thanks Fred!
[ANN] Ruby In Steel 1.5
356810 [huw@da kn on] SapphireSteel Software today released the latest version of the Ruby In
358624 [headius@he d] Cool, Huw, maybe you can post something about this to the JRuby user