52227-53062

51815-52972 subjects 52471-53347

Re: ruby-talk separation and the RWN
52227 [ryand@ze sp ] I'd be happy to help out with that.

Compiling stuff under Windows: list of problems
52245 [gsinclair@so] I don't want my tortuous experience of trying to get things working under this
+ 52248 [nobu.nokada@] Note that mingw32 and mswin32(msvc) are runtime-compatible in
| + 52320 [gsinclair@so] Thanks for the reply, Nakada.
| | 52322 [nobu.nokada@] One extension library is usable from mingw and mswin.
| | 52323 [gsinclair@so] an
| + 52341 [gsinclair@so] OK, I've tried it with snapshot.tar.gz and Borland 5.5.
|   + 52347 [gsinclair@so] Using Cygwin's 'byacc' (within Cygwin) to generate parse.c worked nicely,
|   + 52352 [nobu.nokada@] I add -w- option to CFLAGS to compile.  Borland tools are too
+ 52255 [canyonrat@ma] Well, If you are doing this enough to justify spending the bucks, you
| 52325 [gsinclair@so] Interesting thought.  In fact, if I needed a desktop computer now (I just use
+ 52282 [mikkelfj-ant] This is indeed pragmatic as opposed to dogmatic.
  52313 [gsinclair@so] And the reason would be?  Everything else about Ruby is free.  I'm not
  52315 [gsinclair@so] development

String#% (Re: thoughts on typelessness)
52247 [pit@ca it in] this isn't new syntax. For more info see pp 369 (pp = pickaxe
+ 52249 [gotoken@no w] Sorry, I misunderstood meaning of `new'.  It was introduced at the
+ 52277 [billtj@y. lu] Thanks a lot.  I am sorry that I missed it, because I seldom see it, even
  + 52279 [Dave@Pr gm t] I found it kind of ugly, so I used it rarely in PickAxe examples.
  | 52286 [billtj@y. lu] Totally agree.  So far I am very satisfied with sprintf.
  + 52497 [pit@ca it in] no need to apologize. String#% is really easy to overlook. I hope I

bugs
52259 [kgergely@ml ] I've noticed some bugs in ruby (I expect another results)
+ 52260 [a.bokovoy@sa] Correct.
| 52263 [ben@bl hr co] Ruby most certainly does have a 'local' context. The variable 'b' should
| 52266 [a.bokovoy@sa] Yes, forget about my response on it, too much work per day :(
+ 52261 [nobu.nokada@] Yes, using block argument equals to assignment to it.
  + 52268 [kgergely@ml ] But shouldn't it be local to the block? It may cause nice errors...
  | + 52275 [michael_s_ca] This is a "Ruby Gotcha".  *IF* you declare a variable before the
  | | 52289 [billtj@y. lu] You can browse the just-started list at
  | + 52307 [hal9000@hy e] of posts in the last 2-3 years. The range of
  + 52269 [stathy.toulo] This is an issue discussed previously on this list as well as feature
    + 52270 [kgergely@ml ] So it won't change in the future?
    | 52332 [matz@ru y- a] I'd like to "fix".  But the point is "how" I fix.  I don't know yet.
    | + 52336 [billtj@y. lu] I guess if you are going to use "@__xxx" as class private variables, then
    | | 52338 [gsinclair@so] Gasp!  So many underscores!  So ugly!
    | + 52363 [batsman.geo@] There was a poll on rubygarden.org, but the results were, ummm, unclear.
    |   52367 [billtj@z. lu] Isnt't that using the syntax below contrary to "the ruby way" that we
    |   52401 [batsman.geo@] a = [1, 2, 3]
    + 52274 [stathy.toulo] Unfortunately, I haven't been using Ruby that long but again noticed the
      52419 [bruce@co ed ] I think that's statistically impossible. ; )
      52453 [kgergely@ml ] 1. All the parameters of the block are local to the block.

Tcl implemented in hardware?
52262 [ptkwt@sh ll ] This is a rather strange item.  I was checking out comp.arch.fpga
+ 52273 [suk@po ox co] Hardware VMs for Lisp were basically put out of business by faster general purpose workstations.
| 52335 [bulatz@in eg] what is the VisualWorks?
| 52378 [alwagner@tc ] Smalltalk from Cincom
+ 52283 [mikkelfj-ant] FPGA is just another kind of software and 36MHz is not really impressive
| 52284 [armin@xs .d ] The beauty of FPGAs is the beauty of hardware, namely parallelism,
+ 52500 [llothar@we .] They have a bytecode VM since 1997.

Ruby-libgtop (and RubyCookbook, RAA)
52264 [ptkwt@sh ll ] I was looking at the RAA for something akin to top and saw Ruby-libgtop,
52271 [james@ja es ] Or items may exist, but not be listed in the RAA.

Printing the Contents of a 2d Array
52278 [rotfeast68@h] At the risk of sounding like a nuby to ruby...
+ 52280 [alan@di ik t] How about
+ 52287 [mikkelfj-ant] irb(main):032:0> def test2
+ 52288 [billtj@y. lu] That's because you are mixing array and range, which are totally different
  + 52339 [bulatz@in eg] 0..2   # =>> a range
  + 52375 [rotfeast@ne ] Thanks to everyone who responded.

Β?FLF?V?C^[lbgrWlX
52285 [respanse@st ] ?c???????@?S???e??

Regexp: Stripping out all except ASCII?
52290 [probertm@no ] A simple one, again.  How do I strip out all chars
+ 52292 [mike@st k. o] Did you mean to say
| 52295 [probertm@no ] My apologies, I wasn't clear.
| 52318 [mike@st k. o] Ick ;-)  Here you aren't dealing with characters, but sequences.  For
+ 52294 [billtj@y. lu] Depending on what you mean with "valid ASCII", probably using a lower

SOAP4R: problem with installing cvs version
52293 [info@mj is d] I just checkout out SOAP4R from cvs and tried to install it
52319 [nahi@ke na t] I did not commited redist files in the repository.
52346 [info@mj is d] thanks for help and your great work on SOAP4R

Can soneone tell me what I'm doing wrong...
52300 [gunvalk@co .] mp3DirName = ARGV[0]
+ 52304 [billtj@y. lu] If you ever used C++, then you would have known the issue of deleting an
| 52305 [mgushee@ha e] And for those who haven't used C++ ... what is the issue? And does it
| + 52306 [mgushee@ha e] fileNames = mp3Dir.entries.find_all {|f| f =~ /.*mp3$/}
| | 52312 [billtj@y. lu] Well, I don't know how to explain it easily without using the concept of
| | + 52333 [mgushee@ha e] Well, I do have a general idea of what pointers are, though I can't
| | + 52340 [bulatz@in eg] use a concept of index :) when we delete element currently indexed by
| |   + 52342 [mgushee@ha e] Well, that's simple enough. I was expecting something more esoteric. So
| |   | + 52343 [gsinclair@so] an
| |   | + 52344 [bulatz@in eg] definitely yes! iterator is a method of ABSTRACTING this cycle, hiding
| |   |   52370 [billtj@z. lu] Both Java and C++ have iterators, but usually in C++ books the iterators
| |   |   52448 [bulatz@in eg] in ruby books there is the same examples. may be difference is that
| |   + 52369 [billtj@z. lu] See,
| + 52425 [gunvalk@co .] Cool, thanks. I haven't programmed ruby (or any OO language) in a
+ 52317 [drbrain@se m] Dir.chdir ARGV[0]

using pack and unpack from C
52308 [ian@ca ib n.] How do you call pack and unpack from C when writing an extension?
+ 52309 [nobu.nokada@] They're pack_pack() and pack_unpack(), and static.  You need to
+ 52311 [billtj@y. lu] Any method call that you can do in Ruby you can do in general in C with
  52316 [ian@ca ib n.] Thanks, William and Nobu, too.

z Shopping for a home loan? fto
52314 [lhz@ne sy c.] ...

Named Arguments doesn't work?
52327 [waisun.chia@] Why doesn't this work?
+ 52328 [billtj@y. lu] Is named parameters in method call supposed to be supported in 1.7.3?
+ 52329 [vjoel@PA H. ] class Song
+ 52331 [gsinclair@so] Pretty simple, really.  It's not valid Ruby to use named arguments.  You've

Ruby/TkGnuplot release
52348 [nagai@ai ky ] I've released Ruby/TkGnuplot.
52351 [gsinclair@so] You should use "[ANN] Ruby/TkGnuplot release" as a subject.
+ 52355 [nagai@ai ky ] Oh! I'm sorry. It was bad manners.
+ 52379 [lyle@us rs s] Yes, and also be sure to send the announcement to the new

Please help, question regarding threads
52349 [icculus@gm s] I am somewhat new to threaded applications so am hoping someone can help
+ 52350 [bulatz@in eg] yes. ruby threads are very simple and light. it is close to just
| 52357 [decoux@mo lo] ruby has thread local variables.
+ 52354 [ysantoso@je ] The world of concurrent programming is vast. This little post is far
  52356 [bulatz@in eg] if he writes server, not client, it is better to use one thread per
  52409 [ben@bl hr co] Would you care to explain why? I can give you a great example of at
  52446 [bulatz@in eg] because you need to work with several connections in one thread,
  52479 [ndrsbngtssn@] I know! :)
  52481 [bulatz@in eg] jruby have compatibility problems with ruby in this area? f.e. class

Platforms?
52353 [frido@q- of ] May I ask on what platforms you're using Ruby?

Reusing base classes tests?
52358 [coma_killen@] Whats the standard way to reuse the Test::Unit tests for a
+ 52359 [dsafari@pa a] I'm not sure what you would need to retest in the subclass since whatever you
| 52360 [coma_killen@] Base class (B) has an invariant that should always hold for subclasses
+ 52384 [phlip_cpp@ya] The best way I have found is to inherit, then create the testee in a method
  52386 [meier@me st ] od=20
  52388 [phlip_cpp@ya] LSP means the caller (in this case the test engine) can't tell we called
  + 52404 [meier@me st ] =20
  + 52486 [rking@pa op ] def assert_wheels_equal expected, klass

mod_ruby and postgresql
52364 [harryo@zi .c] I did a quick search on the ruby-talk archive, but to no avail, so here's my
+ 52392 [jeremy@ch os] ???  I use mod_ruby and ruby-postgres to create database-backed web
| 52394 [mgushee@ha e] Have you tried modifying RubySafeLevel in your Apache configuration? For
| + 52423 [harryo@zi .c] I did try that early on, but it didn't fix the particular problem I had at
| | 52431 [harryo@zi .c] Just to save anyone else thinking too hard about my problems, I just thought
| | 52434 [botp@de mo t] if it's not too much to ask. How/what did you fix?
| | 52459 [harryo@zi .c] Alan explained that in order for a user other than the owner of a particular
| | + 52460 [botp@de mo t] Thank you sir Harry for the input.
| | | 52465 [harryo@zi .c] Wow!  I've never been called *that* before :-).  Thanks for the knighthood,
| | + 52511 [alan@di ik t] Just so everybody knows, this is just one way to setup the posgres authentication.
| + 52623 [sean@ru y- a] DO NOT DO THIS!!!  The safety level of mod_ruby is a good thing and
+ 52399 [whitton@at a] You need to change your RubySafeLevel in your httpd.conf file. Here's my

RubyConf: advice needed on event insurance
52373 [dblack@ca dl] I have to arrange event insurance for the conference, and am finding

async call to drb server?
52376 [chrismo@cl b] I have a cgi script that's calling a drb server -- currently the cgi script

Re: RubyCOM
52377 [chrismo@cl b] Do you mean, WIN32OLE allows Ruby -> COM but not COM -> Ruby? You can check

Confusion on Keywords
52380 [billtj@z. lu] My confusion on keywords in Ruby is simple.  First, it was mentioned to
+ 52381 [Dave@Pr gm t] puts type
| 52439 [chr_news@gm ] Not quite - you have to give a little syntactic help
| + 52442 [Dave@Pr gm t] That was my point :)
| + 52450 [gsinclair@so] Ruby wisdom that classes and types are not the same thing.  What a 'type' is,
+ 52382 [matz@ru y- a] It's simply because lexer did not treat identifiers after dots
+ 52390 [hal9000@hy e] You used the term "variable indicators" earlier which
  53034 [billtj@gl e.] Oh yes, totally agree.  They are very obvious when we write Ruby in C.
  53060 [hal9000@hy e] I think I understand you now.
  53062 [billtj@y. lu] You are just being too modest.  Among all the posts that I have seen here,

ASSISTANCE
52383 [mikebundu2@r] DEMOCRATIC REPUBLIC OF CONGO.

Re: Teach me about yield
52385 [mark.firesto] Ok.  I never did C, so I don't know when you would use a function pointer.

CRuby (Was: R)
52391 [tsiivola@cc ] CRuby = subset of Ruby + typed methods + compiler to C
+ 52395 [ndrsbngtssn@] The name CRuby could be a little confusing. The Python people use
| + 52400 [michael_s_ca] Maybe I'm being obtuse here, but I always considered the original
| | 52402 [ndrsbngtssn@] Michael,
| | + 52405 [a.bokovoy@sa] Similar to perl and Perl cases?
| | | 52501 [gminick@un e] Looks like you're right :)
| | + 52445 [bulatz@in eg] in the ruby, "Ruby" and "ruby" is not the same things :)))
| | + 52508 [dblack@ca dl] Since at the moment there's no formal definition of Ruby abstracted
| |   + 52513 [ndrsbngtssn@] An interesting corner case is when you write a script in a language that
| |   | 52522 [dblack@ca dl] That's where I get caught in the philosophical question: without a
| |   | 52525 [ndrsbngtssn@] How would you create a formal definition for something that doesn't have
| |   + 52517 [mikkelfj-ant] It's really simple: file names as in " require 'graph' " ... a typically in
| |     52520 [dblack@ca dl] I figured it was because unix programs are usually lowercase.
| |     + 52524 [hal9000@hy e] Actually, I agree, so I guess I'm in that minority
| |     | 52529 [mikkelfj-ant] I don't really like that because it could easily become unprecise by
| |     | 52530 [ndrsbngtssn@] That is really the situation right now. The "ruby" implementation is the
| |     + 52527 [mikkelfj-ant] May I join your minority?
| |       52532 [tsiivola@cc ] You may very well turn out to be in the majority, but I feel differently.
| |       52534 [mikkelfj-ant] It's like saying don't make a dictionary over english words, someone might
| |       52536 [n1k0@ro er .] OTOH, a spec like ANSI C is so minimal that platform specific extensions are almost necessary... breaking the portability C is supposed to provide.
| + 52414 [bilotta78@ho] What about RubyC (pronounced as Rubik)?
+ 52415 [armin@xs .d ] I am probably a bit too late in that thread (have not read thread "R"),
| 52416 [tsiivola@cc ] 1) Curiosity: To see how it would be done.
| 52417 [armin@xs .d ] Curisoity is always a very good reason;
| 52418 [tsiivola@cc ] Yeah, but it does't quite work out like that: a CRuby app is not a Ruby
+ 52444 [bulatz@in eg] i don't see "char*-->String*" converter, nor support for
+ 52469 [    s@xs .d ] what about Objective C ??
  52473 [bulatz@in eg] ruby has very good syntax and many perl-derived tricks

Development countries. News in brief
52393 [newsletters@] The Financial News, October 2002

Thanks
52396 [icculus@gm s] I think I understand the implications now and am less worried than before.

Ruby's hashing algorhithm
52397 [whitton@at a] There is a very interesting article over on perl.com about how hashes work.

Ruby vec() command equivalent?
52398 [icculus@gm s] vec(expr, offset, bits)
+ 52403 [icculus@gm s] I also wanted to add, that the vec() command in Perl provides the framework
+ 52406 [matz@ru y- a] You can use
  + 52407 [mxvera@qw st] あなたがしたすべてのためにあなたに感謝しなさい! 私達はすべてあなたの仕事を認
  + 52412 [icculus@gm s] Ahh, I will try your suggestion and look into the BitVector extension as

COUNTER-TERRORISM EVENT DRAWS NATION'S TOP EXPERTS TO PHILADELPHIA
52410 [info@bi -d f] LEADING AUTHORITIES ADDED TO BIODEFENSE PROGRAM

Violation of Principle of Least Surprise
52411 [whitton@at a] I'm writing this to report a bug as related to Ruby's principle of
52457 [batsman.geo@] IMO Ruby's design is broken with regard to slickness. Furthermore, it
+ 52463 [batsman.geo@] I've been thinking on this for some time and I'm now convinced that Ruby
+ 52464 [matz@ru y- a] That's exactly why I usually hide in an island in the far east.

spoke too soon
52413 [icculus@gm s] I am still somewhat confused as everything I am trying with select appears
52427 [matz@ru y- a] select([@server])

Installation help
52420 [jeff_thorne@] I am a newbie trying to rid my world of MSFT products...I have
52424 [lyle@us rs s] Sorry, RDE is for Windows only.

installation help
52421 [jeff_thorne@] I am a newbie trying to rid my world of MSFT products...I have install

Re: mod_ruby and postgresql (long)
52422 [harryo@zi .c] This is a long post, because I want to give enough detail to explain the

Global variable for file separtator
52426 [gunvalk@co .] Does ruby have a global variable for the file separator? This is really
+ 52428 [drbrain@se m] =20
+ 52429 [matz@ru y- a] "/" on all platforms.
+ 52430 [gsinclair@so] It's not global, but it's recorded in the File class.

http://eli.fsl.noaa.gov/ruby101 - 101 Reason to Learn Ruby
52432 [ahoward@fs .] All-

Problem running Ruby script on Solaris 2.6
52433 [e_dragoev@ya] I had a few scripts that were running fine on Sparc Solaris 2.6 box.

Re: please tell me about ML (Re: Ruby/TkGnuplot release)
52435 [lyle@kn lo y] No, I apologize, this was just a bad joke. Over the last few days there
+ 52437 [gsinclair@so] I'm sorry, I have to make a correction.  It was in fact a good joke.
+ 52503 [mikkelfj-ant] issue - this is clearly a better approach.

Specifying local and external block parameters (that old chestnut)
52436 [gsinclair@so] I've cannibalised discussion from the "Bugs" thread.  I hope it is a service to
+ 52438 [alan@di ik t] I've asked this before but can't recall any answers. How would one
| 52451 [batsman.geo@] Shouldn't it be
+ 52440 [matz@ru y- a] The "solution" changes time to time in my mind.  Currently I'm
| + 52456 [batsman.geo@] Then there must be a way to turn these warnings off, because shadowing
| | 52462 [matz@ru y- a] I'm afraid I won't give you a way to turn it off.  It is "quite
| | + 52468 [bulatz@in eg] may be some pragma like 'use ruby1.7" can help in providing
| | | 52485 [da.box@ho e.] here we go, down the perl road to disaster...
| | | 52492 [kgergely@ml ] Yes, that was I say under a different topic...
| | | 52494 [bulatz@in eg] "documented bug becomes a feature" :)
| | + 52472 [tsiivola@cc ] So how about the "::" to indicate non-local? This does break things,
| |   52480 [jfh@ci e. fl] I proposed this a while back, too. In this case, though, you wouldn't need
| + 52561 [decoux@mo lo] What it will do with ?
|   + 52568 [Dave@Pr gm t] And similarly with
|   | + 52571 [hal9000@hy e] chestnut)
|   | | 52572 [tsiivola@cc ] It seems theoretically ok, but I am not wild about it. It seems to
|   | | 52603 [list@NO PA c] May I ask, surprises to whom?
|   | | + 52606 [dblack@ca dl] The arguments I've heard for having block-local variables in Ruby
|   | | + 52635 [tsiivola@cc ] a = 0
|   | |   52639 [botp@de mo t] cannot say anything but coool...
|   | + 52585 [decoux@mo lo] For me, it give
|   + 52573 [matz@ru y- a] "1", with warning.
|     52582 [decoux@mo lo] Something like this ?
|     + 52583 [matz@ru y- a] Yes, exactly (although I was not going to allow ":=" in parameter list).
|     | 52584 [decoux@mo lo] If I'm right you just need to change one node when it find :=, i.e.
|     + 52610 [mikkelfj-ant] I have not been following this thread, so I'm sorry if I got it wrong.
|       + 52612 [decoux@mo lo] variable with the same name exist in an outer block. For example
|       | 52715 [batsman.geo@] matz said previously that in
|       | + 52719 [decoux@mo lo] I know this, but you don't have || in my example.
|       | | + 52724 [batsman.geo@] Now I get it... it depends on whether Ruby sees ':=' in the *parsing*
|       | | + 52726 [batsman.geo@] At first sight, this looks great!
|       | + 52720 [matz@ru y- a] They are not "completely different".  Think about the following C
|       |   52722 [batsman.geo@] My concern is about the code meaning different things in _each iteration_;
|       |   + 52723 [decoux@mo lo] See [ruby-talk:52719]
|       |   + 52725 [matz@ru y- a] No need to concern.  It is determined compile-time.
|       + 52645 [bulatz@in eg] i personally think that this usage will be very strange nad
|         52646 [matz@ru y- a] Could you describe "constant assignment" and "variable assignment" in
|         52648 [bulatz@in eg] int a=1;    -- declaring a with type 'int' and value 1
|         52649 [botp@de mo t] fwiw, personally, I prefer "=" for all assignments. In case of ambiguity,
+ 52441 [hal9000@hy e] block-local
| + 52447 [gsinclair@so] So could
| + 52449 [matz@ru y- a] Yes, they are problems.  With the "solution" described in [ruby-talk:52440],
| + 52458 [batsman.geo@] See my note on this syntax in my original reply to Gavin :-)
+ 52452 [batsman.geo@] I hereby claim authorship of any syntax derived from the use of
| + 52454 [gsinclair@so] variable,
| | 52467 [batsman.geo@] Great! The first time in my life I do earn my very own money! Hehe.
| + 52455 [kentda@st d.] Request denied. Previous work proves to be quite similar. Plagarist!
|   52461 [batsman.geo@] I'm just receiving my first royalty checks. Try to take them from me 8-)
+ 52466 [gsinclair@so] Following up my own post, I now see that it has been discussed extensively in
  52506 [hal9000@hy e] chestnut)
  52576 [gsinclair@so] Inspiring.  Truly.
threads.html
top