45702-47288

45579-47085 subjects 45883-47186

^ RAA: Version of Ruby
45702 [m.rokos sh.c] I just spotted at RAA that Ruby has version 1.6.6, could
+ 45703 [dblack candl] Which one?
+ 45719 [matz ruby-la] Oops.

^ Syntax proposal
45723 [list NOSPAMc] class ...
+ 45724 [decoux moulo] Do you accept to have 3 characters rather than 2 ?
| 45900 [list NOSPAMc] Thanks to you, to Martin and to Hal for your suggestions.  Yes, three
| + 45957 [kentda stud.] I try to imagine an implied "if so" after the and.
| + 45995 [tom.hurst cl] Ruby isn't trying to recreate English here.  Try to think more in terms
|   + 45996 [dblack candl] One step closer and you're dead.
|   | 46013 [list NOSPAMc] You're a genius.  This will probably change my perspective on it. :-)
|   | 46015 [Dave Pragmat] Nah - he's just got family in Texas...  :)
|   + 46012 [list NOSPAMc] I can think in logical operations, it's when they blend too well with
+ 45729 [hal9000 hype] FileTest.directory?(dir) ? raise "Directory #{dir} already exists." : nil
+ 45923 [patrick-may ] raise "Directory #{dir} already exists." if FileTest.directory?(dir)
  45953 [list NOSPAMc] Uhm, wasn't this the first among my examples? :-)

^ ActiveRubyScript and RubyAEOSA
45737 [gehlker fast] I just discovered ActiveRubyScript (sometimes written as two words) by
45742 [hal9000 hype] Isn't it actually called ActiveScriptRuby? I'm
+ 45743 [meier meiste] of
+ 45755 [james jamesb] You can write IIS ASP websites in ActiveScriptRuby
+ 45772 [gehlker fast] ActiveScriptRuby is more common. I was just copying the translation from the
  + 45775 [james jamesb] What is the distinction for people who have not (sufficiently) used both?
  | + 45779 [ned bike-nom] It looks like a translated version of the Perl module with a similar
  | | + 45781 [hal9000 hype] What you say is true, Ned. But if I am not
  | | + 45782 [james jamesb] True, but I want to open up the VBA IDE in Word and enter Ruby code, not
  | |   45790 [rich infoeth] You all might want to look at this as well...more along the lines of
  | |   45794 [james jamesb] Oh, thank you!  I had been looking for this a while back.  I remembered
  | + 45804 [gehlker fast] Hmm. Maybe it's a continuum by now. So let me make up an example comparing a
  + 45778 [hal9000 hype] way
    + 45784 [nhodgson big] Microsoft implemented COM on MacOS and for a while even encouraged
    + 45798 [gehlker fast] [Question about COM on MacOS]

^ Ruby 1.6.7 in RAA??
45762 [info mjais.d] maybe this is stupid question but at the beginning of the RAA page
45763 [djberge qwes] No difference.  You have the latest stable release.  Matz just updated the

^ how to do typecasting?
45767 [lists debona] is there a way to typecast values?
+ 45769 [hal9000 hype] a.each {|l| print l.to_s.length }
+ 45770 [1028495857.a] a.each { |v|
  45771 [lists debona] *smackself*

^ File.new :  having problems in windows
45773 [khabibiuf ho] I'm a relatively new user to ruby.  I was trying to use the File.new
45774 [pabs pablotr] You should either use single quotes to store filenames (so the

^ How to create a directory
45776 [briqueabraqu] How can I create a directory (inside another)? I'm using Ruby 1.6,
45777 [james jamesb] ruby -e "Dir.mkdir( 'newdir') "

^ Ruby Portable Runtime?
45780 [mikkelfj-ant] many bright people still hanging out :-)
+ 45786 [matz ruby-la] Probably.  It can reduce my burden.
+ 45833 [comp.lang.ru] Why is this any better than Cygwin? A software layer is a
  45867 [mikkelfj-ant] Cygwin doesn't work. It's practically impossible to have to Cygwin dependent
  45878 [charleshixsn] MS feels that any friction between programs working well on both the Win

^ Ruby and Ocaml - my two favorite languages
45787 [mikkelfj-ant] While being away from Ruby land, I did investigate the OCaml language
+ 45788 [jweirich one] I'm curious.  Could you give an example of this?
| 45789 [mikkelfj-ant] In the past year there have been some threads on this topic and some
| 45815 [meier meiste] ld
| 45826 [mikkelfj-ant] a = new X
+ 45857 [ned bike-nom] Of course, there's no reason why you couldn't use GC with C++; there
  + 45868 [Ephaeton gmx] Agreed. Many people go searching for a new language instead of using
  | 46039 [gsinclair so] Good point, but C++ and Perl can't be reasonably considered to occupy the
  + 45872 [mikkelfj-ant] Actually STL greatly reduces the need for GC thanks to its built in memory

^ ADV: Harvest lots of E-mail addresses quickly !
45795 [emailharvest] Dear ruby-talk =2C

^ RE: Ruby in the rainforest (postlude)
45797 [botp delmont] Besides that, it has substance... I even like the SysAdmin stuff... overall,

^ Question about GetoptLong
45799 [patrick.benn] I'm trying to recreate a Perl script in Ruby and have run into a problem.
45800 [jim freeze.o] I use getoptlong alot, but I'm not quite sure I understand your problem.
45802 [patrick.benn] I thought my message was fairly self-explanatory, but I guess not.  Here
45803 [jim freeze.o] Ok, now I see. My question is why do you call it twice?
45805 [patrick.benn] Because I have separate methods/classes that are standalone (OO
+ 45806 [nobu.nokada ] So set opts.ordering to GetoptLong::REQUIRE_ORDER, and make new
| 45807 [patrick.benn] Sorry, that won't work.
| + 45810 [pit capitain] 1) call GetoptLong in the beginning of the program with all possible
| | + 45811 [gotoken notw] ARGV.replace(saved_ARGV)
| | + 45845 [patrick.benn] Not possible since some of the arguments have different meanings (and
| + 45812 [nobu.nokada ] AFAIK, GetoptLong never eat non-option arguments regardless
|   45848 [patrick.benn] Well with Ruby 1.6.6 it does.  If I have XXXX -c -a and the GetoptLong
|   + 45849 [hgs dmu.ac.u] Consuming all the options so they are out of the way is a feature
|   | 45851 [patrick.benn] It certainly makes sense for it to eat the options it understands, but I
|   + 45980 [nobu.nokada ] You need to call GetoptLong#terminate seeing "-c".
+ 45808 [jim freeze.o] Hmm, I would not consider many of the options very pretty.
  45809 [patrick.benn] Reasonable idea, but.... it still won't work since GetoptLong (wrongly
  45824 [jim freeze.o] Yes. This method only works if you know all possible command options.

^ Unicode in Ruby now?
45829 [tpeters inva] I've read the thread "Unicode in Ruby's Future?" [ruby-talk: 40016]. It
45840 [matz ruby-la] Yes.
+ 45922 [cjh_nospam m] Matz,
| + 45931 [cjs cynic.ne] Yes.
| | + 45932 [hal9000 hype] Well, here is your chance to contribute to
| | | 45933 [cjs cynic.ne] I doubt it. My opinion of the matter is that the correct way to
| | | 46032 [dan sidhe.or] This is just a comment from an interested but mildly uninvolved
| | | 46041 [cjs cynic.ne] I don't think it's so presumptious.
| | + 45934 [matz ruby-la] I don't think we hate I18N in general, but I admit many Japanese hate
| |   45937 [matz ruby-la] By the way, what are the required I18N features to satisfy you?
| |   45951 [cjs cynic.ne] Me? Not so much, actually. I need to be able to read in ISO-8859-1,
| |   45952 [matz ruby-la] Reasonable.  How do you want to specify the reading/writing charset?
| |   + 45958 [cjs cynic.ne] Well, what Java does works fine for me. Basically, java has "streams"
| |   | 45992 [matz ruby-la] Thank you for information.
| |   | 46027 [maki rubycol] IMHO, Mojikyo is a character-glyph set. It defines detail
| |   | 46034 [cjh_nospam m] That sounds fair, but computers still need to process such symbols.
| |   | 46040 [tpeters inva] Then we would delay i18n string processing until the iso 10646 people have
| |   | 46109 [matz ruby-la] I'm not against Unicode or any other charset.  I just want that the
| |   + 45975 [tpeters inva] How about
| + 45935 [matz ruby-la] Mojikyo character set contains all the CJK characters in ISO 10646.
+ 45954 [tpeters inva] Nice. I still think sources and sinks of characters also need an
| 45960 [cjs cynic.ne] Yeah. This is getting into complex nightmare city. That's why I'd prefer
| + 45961 [ontologist_2] As for someone who just wants to use a set of
| + 45964 [tpeters inva] Sorry, with "other" I meant besides Mojikyo. ?
| | 45972 [cjs cynic.ne] No, and no. As specified in section 2.2 of the standard (I quote
| + 45965 [meier meiste] y,
| + 45969 [a.bokovoy sa] Unicode 3.1 is 32-bit wide. I do not see reason to exist projects like
| | 45973 [cjs cynic.ne] I have just looked at my 3.0 standard and the 3.1 and 3.2 updates on the
| | 45979 [a.bokovoy sa] 3 Relation to ISO/IEC 10646 and UCS-4
| | 45982 [cjs cynic.ne] Actually, I was looking for someone to attack my argument, not
| | 45993 [a.bokovoy sa] difference in ISO/IEC 10646 and Unicode very soon in sense of covered code
| | + 46005 [ontologist_2] I beg your pardon,
| | | 46018 [matz ruby-la] Probably you're asking Curt, but I will answer what I can.
| | + 46042 [cjs cynic.ne] Right. They're *reducing* the ISO/IEC code space to match Unicode.
| |   46260 [cjh_nospam m] No. Unicode uses UCS-4 characters, 32 bits. It also provides UCS-2,
| |   46266 [cjs cynic.ne] These statements are both very wrong. Please consult the Unicode
| |   46281 [cjh_nospam m] I was deliberately being "reinterpretive", but what I said is the effective
| |   46284 [cjs cynic.ne] What part of "UTF-32 is restricted in values to the range 0..10FFFF16,
| |   46347 [cjh_nospam m] I see you have built a new 21-bit computer which is going to conquer
| |   46353 [cjs cynic.ne] If I want to store 21-bit values, I store them in a 32-bit word, wasting
| |   + 46362 [cjh_nospam m] Hey, no need to shout. Why is there a Mojikyo standard if no-one's being
| |   | 46363 [cjs cynic.ne] Because certain very specialized applications, mainly to do with
| |   | 46376 [cjh_nospam m] I intend to drop the discussion too, since you seem to want to
| |   | + 46377 [transami tra] its a fight! :)
| |   | | + 46397 [bjsp123 yaho] i'd like to hear.
| |   | | + 46499 [cjs cynic.ne] Unicode covers a lot of what people want to do, but not everything.
| |   | + 46497 [cjs cynic.ne] I wish you'd said that at the beginning. I would never have started
| |   + 46372 [akr m17n.org] Because Unicode has all JIS X 0208 characters in BMP.  However new
| |     46501 [cjs cynic.ne] Yes. And also all JIS X 212 characters.
| |     + 46565 [qrczak knm.o] Well, not that much: at most 3/2 times larger.
| |     | + 46570 [taw users.so] UTF-8 is 50% larger than UTF-16 only for text which consist only of
| |     | + 46590 [cjs cynic.ne] Sorry; you're right.
| |     |   46777 [unet rexx.co] UTF-8 is designed so that you always know if you are in the
| |     |   + 46783 [mikkelfj-ant] I have nothing against UTF-8, but it isn't really a strong point. When would
| |     |   | 46945 [cjs cynic.ne] Well, in a lot of cases it's no big deal, because you just want to
| |     |   | 47054 [unet rexx.co] UTF-8 parsers must ignore "broken" characters because, as I pointed
| |     |   | 47288 [cjs cynic.ne] Ah. So does this mean that if I break a String into two in the
| |     |   + 46947 [cjs cynic.ne] I agree. What we may not agree on is that surrogates work very well
| |     |     + 46951 [matz ruby-la] They are both fully present in Unicode BMP, but mapping is not
| |     |     + 47058 [unet rexx.co] What is in use is determined not only by what character sets and
| |     |       47059 [Dave Pragmat] Which leads to some interesting Orwellian possibilities: not just
| |     |       47128 [bjsp123 yaho] character set so
| |     + 46591 [akr m17n.org] For Shift_JIS people, JIS X 0213 provides a Shift_JIS compatible encoding.
| + 45989 [mikkelfj-ant] respectively,
|   46044 [cjs cynic.ne] No, because then you have to deal with conversions. Most popular
|   46100 [mikkelfj-ant] Not really, you just produce a runtime error that the data cannot be - say -
|   46182 [cjs cynic.ne] I don't have my spec. handy, so I'm going from memory here; someone with
+ 46451 [qrczak knm.o] On Unix it's generally the encoding determined by the locale.
  46453 [qrczak knm.o] Unicode is not 16-bit. The code point range is 0..0x10FFFF.
  46500 [cjs cynic.ne] UTF-8, UTF-16 and UTF-32 are all able to represent all Unicode

^ How to Emulate C/C++ Pointer/Reference in Ruby?
45834 [billtj glue.] Is there any easy way to emulate C pointer or C++ reference in Ruby?
+ 45835 [decoux moulo] Well, rather than give the File object to the Childs just give it the Root
+ 45841 [nat.pryce b1] You could wrap the File object owned by the Root in another object that
+ 45843 [pbrannan atd] There is no need to emulate references.  With the exception of certain
  45880 [billtj z.glu] Thanks for all the responses.  For efficiency purposes (because the file
  45884 [dblack candl] [My understanding, subject to corrective intervention]
  + 45894 [justinj mobi] nil, true, false and FixNum are internally stored by value.  The runtime
  + 45898 [billtj z.glu] Well, probably for the temporary variable it is not very useful to have a
  + 45899 [pbrannan atd] #include <iostream>

^ Individual elements of regular expressions
45836 [briqueabraqu] Guys,
+ 45842 [dblack candl] (Performing some joins on the above, as per your verbal description of
+ 45854 [hal9000 hype] I think David perhaps answered half your question...
  45871 [briqueabraqu] Great! That's exactly what I want. There's only one missing point: how
  45875 [dblack candl] /regexp/m
  45888 [briqueabraqu] 877

^ Ruby code is the shortest (language shootout)
45837 [gunnar.ander] Sorry if this has been posted already and I missed it.
45892 [rawlins cs.u] This study skipped something that seems rather important to me if he's

^ Determining whether a file has been moved vs. deleted
45846 [djberge v55h] Is there a way, once a file has been opened, to determine whether it's
+ 45847 [hgs dmu.ac.u] Depending on OS, can you create a hard link to the file so that when
+ 45921 [jeremy chaos] Um, but the file *does* still exist.  The thing that no longer exists

^ Late contribution to discussions
45850 [gsinclair so] I just joined the mailing list, having but read it through the web for
+ 45904 [ned bike-nom] As long as you're dealing with systems with no files, potentially
| 46010 [gsinclair so] Good point.  Controlling these suckers using Ruby would be much better than
| 46014 [ned bike-nom] But it's not going to happen any time soon; Ruby's footprint is much
+ 46046 [justinj mobi] *not*
  46073 [hal9000 hype] Actually, one place this might be useful is

^ FXRuby: how do you capture a canvas resize?
45858 [paul floorba] I'm building a small drawing application by hacking the Scribble example
45873 [lyle users.s] @canvas.connect(SEL_CONFIGURE) do |sender, sel, evt|
45891 [paul floorba] the
45903 [lyle users.s] If I add the lines I showed in my previous e-mail (i.e. catching the
45906 [paul floorba] Did the same here on windows, it looks like it is a windows-only quirk: I
45928 [lyle knology] OK, I'm seeing the same behavior here under Windows. Looks like you might
45950 [paul floorba] Excellent, that worked, thanks!

^ matrix challange
45859 [lists debona] I'd like to see the various solutions for coming up with code to
+ 45860 [decoux moulo] pigeon% ruby -rmatrix -e 'a = Matrix[[1,2],[1,3],[2,4]]; p a.transpose'
+ 45861 [pbrannan atd] irb(main):001:0> require 'matrix'
+ 45862 [dblack candl] require 'matrix'
+ 45863 [gsinclair so] Isn't there a Matrix class in the distro?
+ 45864 [mulperi iki.] irb
| 45866 [lists debona] Sorry all, I actually checked for a matrix class, but I must have missed
| + 45869 [lists debona] I've been looking at the PP's Guide and I can't seem to see it in there.
| | 45870 [pbrannan atd] ruby -rrbconfig -e 'puts Dir.entries(Config::CONFIG["rubylibdir"])'
| + 45889 [pit capitain] I guess using one of my own libraries doesn't qualify either, but
|   46036 [vjoel PATH.B] require 'enum/op'
+ 45865 [STUCKNER MUL] For those of us who didn't know Matrix was built in, my first crack at it
+ 45874 [transami tra] funny you should ask. i just had to do that myself.
| 45879 [dblack candl] There's nothing for Ruby to pick up on.  If Ruby's first exposure to
+ 45926 [pizza parsee] ruby -rmatrix -e'puts Matrix[[1,2],[1,3],[2,4]].transpose'

^ Emacs is dead, long live whatever comes after that as long as it is made with Ruby
45876 [jani.alanko ] Subject is not exactly right but I was too lazy to invent something that
+ 45877 [putsch mxim.] VIM has the ability to have an embedded Ruby interpreter.
| + 45881 [charleshixsn] I didn't see any reference there to using Ruby as a scripting language.
| | + 45885 [1028570860.4] Well, perhaps you didn't read enough?
| | | + 45896 [tsiivola cc.] Every lisp is sacred,
| | | + 46000 [charleshixsn] Mea culpa, you are correct.  I guess that when I saw the list of files
| | + 45929 [tim vegeta.a] If you don't like using the search feature of the user manual on the
| + 45930 [web2ed yahoo] Well, (Emacs) is great!, however, I'd have to hold {gcc} over Emacs.
| | 45981 [michael_s_ca] Well, plus a cast of hundreds, if not thousands of others.
| + 45994 [tom.hurst cl] It's not really the same thing though.  If you remove Lisp from emacs,
+ 45886 [dblack candl] If you hate Emacs, I have to wonder why you're interested in
  45988 [jani.alanko ] I don't hate it, in fact I would love to use program like Emacs but I just
threads.html
top