2607-2828
2397-2757 subjects 2823-3055
GConf module for ruby
2607 [yashi@ya hi ] # Sorry for multi-posing same message here as well as ruby-ext
2608 [yashi@ya hi ] just spent half a day writing the module. you can't do anything but
linux-alpha/ccc / syntax
2609 [wknaka@po ox] I've been working on getting ruby to compile on linux/alpha using
2611 [matz@ne la .] From unknown reason, ccc does not allow volatile in function
2612 [wknaka@po ox] I found very little documentation on this. ccc is supposed to convert
Structs and dictionary keys
2613 [wknaka@po ox] What's the purpose of the name when you create a new Struct?
2614 [matz@ne la .] It will be the name of the newly created subclass of Struct.
irb for 1.5.x
2617 [Andy@To ls e] I'm trying to get irb to work with the latest Ruby.
+ 2618 [schneik@us i] # Also, I am planning on documenting irb for the book -- would it be a
| 2619 [andy@To ls e] I think that'd be a great idea, we just need to get here from
+ 2620 [matz@ne la .] It's fixed in the current version. Oops. `irb' is not committed in
2672 [andy@To ls e] token_n = token_n.id2name unless token_n.kind_of?(String)
2675 [Dave@th ma e] Is this because of the reclassification of the SyntaxError exception?
2684 [komatsu@sa i] In the message of [ruby-talk:02675] Re: irb for 1.5.x
comp.lang.ruby is now an active newsgroup.
2621 [schneiker@ju] ((This note is going to both comp.lang.ruby and the ruby-talk mail list.))
Few unrelated C-source questions
2624 [aleksi.nieme] Should class.c's rb_scan_args initialize not provided optional arguments
2628 [matz@ne la .] Currently use argc (or return value from rb_scan_args) to check number
Re: MAILGATE: comp.lang.ruby
2625 [schneiker@ju] I am guessing not since I didn't see this on the ruby-talk mail list (which
2626 [matz@ne la .] I'm planning gateway the list and newsgroup, so that one can choose
2637 [nosuzuki@e- ] I am writing gateway scripts between NetNews comp.lang.ruby and
OT: Japanese names
2639 [Dave@th ma e] Every now and then, I'd like to give credit to the writer of some
2640 [matz@ne la .] The latter. But relax. See answer 2.
2641 [gotoken@ma h] Some Japanese guys (including me) write their family name in upcase
2642 [Dave@th ma e] Context free names! Gotta love it.
Ruby Toplevel
2643 [Dave@th ma e] Is there any way to express the Ruby toplevel in Ruby itself (without
2644 [matz@ne la .] I don't think there is.
2645 [Dave@th ma e] I was trying to write a section on the toplevel environment for the
2646 [matz@ne la .] I see what you mean. I was misunderstanding you.
2647 [Dave@th ma e] True enough. What I'm trying to illustrate though is how that binding
2648 [matz@ne la .] Bindings can only be used for the optional second argument of eval().
2649 [Dave@th ma e] Agreed, but using a binding is cheating, because I wanted to show the
[1.5] eval / module_eval
2650 [decoux@mo lo] I'm still trying to understand the security mechanism of ruby.
2652 [matz@ne la .] eval() evaluates a string under the current context. module_eval()
Append alias for Array.append?
2651 [aleksi.nieme] Some reason there's no Array.append? Or, let me rephrase, should there exist
+ 2653 [matz@ne la .] Python's append works like this.
| 2666 [quinn@en y. ] Actually, the reason python's append works like that is deprecated hysterical
| 2679 [schneiker@ju] different
+ 2654 [hideto-i@rr ] I don't know whether Array should has the `append' method.
2655 [aleksi.nieme] exist
2656 [aleksi.nieme] Good point.
+ 2657 [andy@To ls e] It does, and I get finger cramps from all the typing that is
+ 2701 [hideto-i@rr ] I'd add Array.shrink. But some native English speakers might think
+ 2702 [andy@To ls e] I think push and pop are fine, or if you wanted the opposite
| + 2704 [hgs@dm .a .u] But prepend means append to the beginning. It does not undo an append.
| | 2715 [Dave@th ma e] I'm not sure I should be weighing in here, but I really don't like
| | + 2716 [aleksi.nieme] Are you saying here that we should make the basic classes as simple as
| | + 2723 [schneiker@ju] Wait! Stop right there!
| | 2724 [Dave@th ma e] I happen to agree 100% (particularly if you all let _me_ choose the
| | 2727 [schneiker@ju] prefer
| + 2707 [hideto-i@rr ] Now I've come to understand.
| 2708 [thucdat@ho m] What about chop or drop instead of prepend?
| 2720 [schneiker@ju] Absolutely.
+ 2709 [matz@ne la .] I'll vote against it. You cannot tell which end `shrink' remove
| 2713 [aleksi.nieme] This is true and something I can't value easily. It's great to have you
| 2714 [aleksi.nieme] I'm not writing this as a opposite argument. In a same spirit, this is a
| 2744 [matz@ne la .] How about 'b[2,3] = a.slice!(-3,3)'?
+ 2726 [schneiker@ju] # From: Aleksi Niemel? <aleksi.niemela@cinnober.com>
2729 [hideto-i@rr ] Yes, I agree.
2736 [andy@To ls e] FYI, it's not on my ISP yet either.
Emacs mode?
2658 [jesse@pr nz ] is there such a thing as a ruby mode for Emacs? Searching the FAQ and
2659 [andy@To ls e] In the distribution, under the directory misc, you'll find ruby-mode.el.
2661 [jesse@pr nz ] Oops. Thanks. Somehow I missed that one.
win OLE / eRuby
2660 [Andy@To ls e] I'm looking for a few more short examples of win32ole. Is anyone
+ 2662 [crouton@du l] If you know apache web server, you can invoke eruby via accessing
| + 2663 [aleksi.nieme] Great example, thanks!
| | 2664 [crouton@du l] <%=foo%> is short form of <%print foo%>
| | + 2665 [crouton@du l] Let me add a small explanation.
| | + 2703 [crouton@du l] Let me add a small explanation.
| + 2718 [andy@To ls e] Umm, I'm a little confused. There is no eruby binary in the
| + 2719 [fit0298@fi e] eruby is an implementation of eRuby, too ;-)
| + 2722 [crouton@du l] # Sorry for my previous multiple mail. The queue was not flushed.
+ 2676 [nakahiro@sa ] May I ask this question in Japanese mailing list?
| 2682 [andy@To ls e] Please, by all means!
| 2734 [nakahiro@sa ] I forwarded the article to ruby-list to get a serious application
| + 2735 [crouton@du l] $ tar xzf mod_ruby-0.1.7.tar.gz
| | 2739 [andy@To ls e] Wow, thanks. I'll give it a look.
| | 2776 [nakahiro@sa ] Thanks to Ishii-san, new example has arrived in ruby-list.
| | 2778 [matz@ne la .] I think it's good to document them separately. README.en in eruby
| + 2771 [m_seki@mv .b] ERb sample code is here.
+ 2795 [m_seki@mv .b] Table.rhtml writes a table of alternate white and gray rows.
2807 [nakahiro@sa ] Godd example from developer. :)
The reference manual is now online
2667 [Dave@th ma e] Thanks to Mike Hendrickson at Addison-Wesley, we're please to announce
+ 2668 [schneik@us i] # Thanks to Mike Hendrickson at Addison-Wesley, we're please to announce
| 2669 [Dave@th ma e] Thanks! The check's in the mail ;-)
| 2694 [hipster@xs a] This reference is most definitely a Good Thing[tm]! Thanks a lot.
| 2700 [Dave@th ma e] The revision number is a great idea, and I'll look at adding it on the
| 2705 [DDouthitt@cu] ...
| 2712 [Dave@th ma e] Let's tread gently here. It takes something of a leap of faith for a
+ 2671 [nakahiro@sa ] Ruby HotLinks maintainer.
2673 [Dave@th ma e] Yes - that will become the definitive site once we get it fully
+ 2680 [schneiker@ju] announce
| 2681 [schneiker@ju] ...
+ 2683 [Dave@th ma e] Oops - as Andy pointed out, the link should be
+ 2691 [schneiker@ju] (FYI: Reposted to comp.lang.ruby from ruby-talk ML.)
+ 2733 [nakahiro@sa ] Links in this page take me to non-#80 site...
2743 [Dave@th ma e] This is a bug.
[OT] Name endien (Re: Re: Append alias for Array.append?)
2670 [matz@ne la .] In Japanese, family name always comes first, then given name comes
Tainting
2674 [Dave@th ma e] I'm trying to document all the various taint checks in the
2678 [Dave@th ma e] \item Can't manipulate a directory whose name is a tainted string.
+ 2685 [decoux@mo lo] * only for setuid, setgid script (see init_ids)
| + 2687 [matz@ne la .] Too late for "-T" option at /tmp/test.pl line 1.
| + 2688 [decoux@mo lo] moulon% cat a.pl
| | 2690 [Dave@th ma e] Is the answer simply to defer all path and RUBYOPT processing until
| | + 2692 [schneiker@ju] (Reposted from ruby-talk ML to comp.lang.ruby.)
| | + 2693 [matz@ne la .] I gues it is. I'll move adding RUBYLIB and "." to the load path after
| | 2697 [schneiker@ju] (Reposted from ruby-talk ML to comp.lang.ruby.)
| + 2689 [Dave@th ma e] Good stuff
+ 2686 [matz@ne la .] Here's (imperfect) list.
new to ruby
2677 [mugoi@ma l. ] a perl background and was hoping i could pick ruby up rather
2695 [matz@ne la .] Let's face it. Not yet. Perl is close to _that_ popularity.
2698 [schneiker@ju] If you were to receive one of the McArthur "Genius Award" grants (or
2699 [matz@ne la .] Yes. The only problem is that I'm the last man to be a genius ;-)
2725 [schneiker@ju] I think that's an implementation detail (tm), albeit a big one, mainly due
Fw: Re: The reference manual is now online
2696 [schneiker@ju] (FYI: Reposted to comp.lang.ruby from ruby-talk ML.)
X++?
2706 [aleksi.nieme] My (daily :) contribution to the sudden burst of traffic: I start yet
2710 [matz@ne la .] (1) ++ and -- are NOT reserved operator in Ruby.
2711 [aleksi.nieme] so
R(R|O)DBI?
2717 [aleksi.nieme] Before we RAA have stable tag everywhere on Library/Database section is
+ 2721 [schneiker@ju] already
+ 2746 [matz@ne la .] Some friends in Japan made prototype for RDBC(Ruby Database Connection).
2747 [aleksi.nieme] I don't have any databases at my current location, and at home only unused
2756 [matz@ne la .] OK, I'll ask them. The program I have now has no documentation, plus
2763 [alwagner@tc ] I need a db interface. I would like to try it also.
2768 [matz@ne la .] What DBMS do you want to connect? Although RDBC is still a toy,
Public/Private clarification
2728 [alwagner@tc ] I have read the documentation and am now browsing sample code to learn
2730 [Dave@th ma e] 'printf' is a module function in Kernel, and the Kernel module is
2742 [alwagner@tc ] Thanks, Dave. That helped a lot. And yes, it is neat.
irb buggette
2731 [Dave@th ma e] The script irb.rb assumes that ruby is in /usr/local/bin.
2732 [matz@ne la .] I'll fix it. In fact I've already fixed it.
2737 [andy@To ls e] 1) It came that way
2738 [andy@To ls e] Apologies all, that last message wasn't supposed to go out to the list -- I
irb install
2740 [Andy@To ls e] Matz is going to include irb with the next Ruby distribution,
+ 2741 [aleksi.nieme] It's surely is an important tool. I vote for inclusion.
| 2749 [gotoken@ma h] Well, it seems to be difficult to decide the timing of each Ruby devel
| 2750 [Dave@th ma e] One of the real strengths of Perl is
| 2751 [andy@To ls e] Excellent! Will you consider adding mod_ruby to install_app as
| 2755 [matz@ne la .] No. I think mod_ruby should follow Apache's rule, since it is an
| + 2758 [andy@To ls e] Fair enough.
| | 2777 [nakahiro@sa ] Agreed.
| | 2779 [matz@ne la .] eruby? I don't think so. RDtools? Probably.
| | 2808 [nakahiro@sa ] Agreed.
| | 2809 [Dave@th ma e] My feeling is that rd should be included because some form of
| | 2810 [nakahiro@sa ] (Again and again...) Agreed.
| | 2811 [Dave@th ma e] The following message is a courtesy copy of an article
| + 2766 [Dave@th ma e] If there's one application I think _should_ be included, it's rdtool -
+ 2745 [matz@ne la .] I'm going to pack irb in next distribution. Probably I will add new
+ 2748 [aleksi.nieme] Sounds great!
+ 2761 [alwagner@tc ] I am confused. I installed 1.4.4 and it seems to include irb. irb.rb
2767 [matz@ne la .] I was speaking of installing it by make.
RE: Array.pop and documentation [was: Append al ias for Array.append?]
2752 [aleksi.nieme] Fun!
+ 2753 [decoux@mo lo] It's normal, it is only in 1.5 :-)
+ 2759 [matz@ne la .] Because I'm living 7 hours ahead of you all the time.
| 2760 [Dave@th ma e] Do you do lottery numbers?
| + 2762 [alwagner@tc ] It'll do more than save duplicating some effort. It'll help me make
| + 2769 [matz@ne la .] No. In addition, from unknown reason, it takes hours for information
+ 2783 [schneiker@ju] # In message "[ruby-talk:02714] Re: Append alias for Array.append?"
2785 [aleksi.nieme] Conrad,
2791 [schneik@us i] # Conrad,
2796 [alwagner@tc ] I hope it's OK for a newbie to comment here. Why complicate things with
2798 [aleksi.nieme] Asking such questions isn't bad thing to do! There might be others in the
+ 2799 [schneik@us i] # I hope it's OK for a newbie to comment here. Why complicate things with
+ 2802 [alwagner@tc ] You seem to be using the word "slice" in a context where "truncate" is
2805 [schneiker@ju] Sort of looks like COBOL done right and made worth keeping around.
More code browsing questions
2764 [alwagner@tc ] I see some class definitions contain "include" and "extend" statements.
2765 [Dave@th ma e] Both include and extend take one or more modules and add their methods
2772 [alwagner@tc ] ===========================================================
+ 2773 [matz@ne la .] 'include' adds features (methods) to instances of the class TkAfter.
+ 2775 [Dave@th ma e] In Ruby, class definitions are executable code, not just lame old
2786 [alwagner@tc ] Aha! Ruby is beginning to smell more and more like Smalltalk. I like
2770 [Andy@To ls e] I'm trying to install mod_ruby 0.17 with the latest Ruby from CVS,
2774 [matz@ne la .] Hmm, Makefile.RB should find the place for libruby.a or libruby.so
2780 [decoux@mo lo] This is a 1.5, no ?
2781 [decoux@mo lo] Forget this, this is just stupid :-(
Re: comp.lang.ruby (Was: Re: Append alias for Array.append?)
2782 [schneiker@ju] Any reputable ISP should automatically be adding entries for the so-called
Re: Ruby vs. The Others
2784 [schneiker@ju] Well, Perl still helps feed me, so I still have some appreciation for it. It
2790 [matz@ne la .] I haven't get comp.lang.ruby yet.
Time Conversions
2787 [DDouthitt@cu] ...
+ 2788 [Dave@th ma e] require 'parsedate'
+ 2789 [matz@ne la .] One-liner? here it is.
2792 [DDouthitt@cu] ...
+ 2794 [aleksi.nieme] ...
+ 2797 [Dave@th ma e] Converts the array into a list of parameters.
After-the-fact installation questions
2793 [alwagner@tc ] I probably should have asked this before I installed. I unpacked
2815 [matz@ne la .] Do you mean you want to tell ruby to search for ~/tmp/ruby-1.4.4/ext?
2816 [alwagner@tc ] ========================
2820 [matz@ne la .] Ruby does not search files recursively. You must specify paths
rdtool output libraries
2800 [Dave@th ma e] This weekend I'm in the throes of documenting rdtool, so expect a
2803 [toshirok@yb ] Questions about RD and RDtool is always welcomed.:-)
Couple of minor rdtool bugs
2801 [Dave@th ma e] 1. rd2man-lib.rb is missing the line
2804 [toshirok@yb ] Thank you!
Fw: Ruby vs. The Others
2806 [schneiker@ju] ...
Fw: sorta OT (ISPs and comp.lang.ruby, browsing ruby-talk mail list without signup.)
2812 [schneiker@ju] without signup.)
Re: sorta OT (ISPs and comp.lang.ruby, browsing ruby-talk mail list without signup.)
2813 [Dave@th ma e] The following message is a courtesy copy of an article
www.rubycentral.com - Reference
2814 [neumann@s- i] I (perhaps) found some errors in the Reference at www.rubycentral.com.
+ 2817 [Dave@th ma e] To convert LaTeX to XML, the first stage is to tag the matching
+ 2819 [matz@ne la .] It's available only in Ruby 1.5.x. For 1.4.x, use find.rb.
Bug in Dir
2818 [Dave@th ma e] ruby 1.5.3 (2000-05-10) [i686-linux]
Re: Bug in Dir (PR#3)
2821 [matz@ne la .] Oops, fixed by the patch below.
A question on Dir["**"]
2822 [Dave@th ma e] The following message is a courtesy copy of an article
2824 [matz@ne la .] Could you forward this message to the newsgroup please?
2826 [Dave@th ma e] The following message is a courtesy copy of an article
2827 [matz@ne la .] Could you mention irb, not rbc, please?
2828 [Dave@th ma e] Of course.
threads.html
top