223838-232003
223646-225362 subjects 224020-225716
^ Book wanted: Concurrent Ruby Programming (was Re: Book wanted: Metaprogramming in Ruby)
223838 [znmeb cesmai] That was actually my purpose in making the suggestion ... to stimulate
+ 223848 [rtilley vt.e] I'm fascinated by it as well and would certainly buy a book that goes into more
+ 223879 [ola.bini ki.] Gambit Scheme is wicked. Incredibly cool. Lisp + Erlangs concurrency
| 223951 [znmeb cesmai] The latest version of "Termite" isn't in the latest beta of Gambit
+ 224001 [work ashleym] I read this a while ago - I have a feeling the link came from this
224021 [znmeb cesmai] Yes ... there was some discussion a while back on that. Despite the fact
^ Linux authentification check?
223841 [roman.hausne] Is there a library or some other way to simply check whether a
223843 [snowblink gm] ruby-pam might be what you're looking for.
223855 [roman.hausne] It seems this needs the system PAM libraries to be installed.
223864 [wilsonb gmai] Are you saying that PAM isn't installed on your Linux box?
+ 223880 [victor.reyes] Would LDAP do it?
+ 223910 [roman.hausne] The linux machine is not under my control. I am just the one who writes
+ 223913 [vjoel path.b] $ ri String#crypt | cat
+ 223914 [gabriele.mar] str.crypt(other_str) => new_str
| 223917 [roman.hausne] Thanks!
+ 223929 [snacktime gm] Only if your server runs as root though, and only if the linux server
^ Why am I getting this string error?
223844 [pbailey bna.] Can someone explain to me why I'm getting the error below for this part
223850 [vincent.four] You're modifying file_contents during scan, so scan gets confused.
223875 [pbailey bna.] 20 Dir.glob("*.ps").each do |psfile|
^ ruby-oci8 install problem. Oracle instant client + os x + rails
223845 [keenytn1 hot] Perhaps some of you may be able to shed some light on the following. I
+ 223854 [wilsonb gmai] For reasons known only to themselves, Oracle has yet to release an
+ 223985 [shiwei1.zhan] I have no OS X environment, I just have Linux environment. But for
^ How to make a cycling counter from commandline?
223846 [darenbell gm] count=1
+ 223851 [jan.svitok g] Search the archives for count or counter. It was discussed last week or so.
+ 223852 [tim.pease gm] $ cat tmp.rb
+ 223853 [tim.pease gm] total = ARGV[0] || 15
+ 223862 [ara.t.howard] man, you learn something every day! that's pretty sweet.
+ 223868 [angus quovad] From my BBS years I remember adding... mmm... \033[K"? at the end of
| 223869 [tim.pease gm] Yeah, that was the fatal flaw in my little post there. That is one
| 223962 [botp delmont] Tim Pease [mailto:tim.pease@gmail.com]
+ 223918 [david vallne] Smells unportable between Linux, Windows, and Mac Classic. Then again, I
+ 223922 [gabriele.mar] A portable way (but maybe overkill for this) is by using the ncurses
+ 223938 [tim.pease gm] "\r" is completely portable. win32 platforms use a "\r\n" for the end
+ 223958 [botp delmont] David Vallner [mailto:david@vallner.net]
^ ruby questions
223847 [merrua yahoo] Is it possible to use a ruby variable to pass information to a mysql
223989 [collinsj sea] You will need to be much more specific with your questions. From what I
^ Concat is driving me crazy
223856 [jay.janshesk] This is driving me crazy. For some reason
+ 223859 [jay.janshesk] I found the answer: I'm a moron. Please disregard.
+ 223861 [tim.pease gm] What type of objects are _prodcut_ and _title_? Most likely the
^ Higher Order Ruby (was Re: Book wanted: Metaprogramming in Ruby)
223857 [pat.eyler gm] Yay!!! This is one of my favoritest series of blog posts ever. If I wasn't
^ Help with a program to determin leap years.
223860 [shiloh.madse] So, I'm trying to go through the Teach Yourself Programming book by
+ 223890 [m_goldberg a] 1. Write a is_leap? method.
| 223894 [ jupp gmx.de] def is_leap?(y)
+ 223891 [dblack wobbl] require 'date'
| + 223895 [wilsonb gmai] def leap?(year)
| + 223928 [gm.vlkv gmai] what about small optimization (just for fun);
| + 223967 [botp delmont] # year % 4 == 0 unless (year % 100 == 0 unless year % 400 == 0)
+ 223902 [m_goldberg a] The key point of all the methods proposed in this thread is: deal
223920 [shiloh.madse] AH! i was looking at it wrong...startin from validating divisible by 4
^ 99 bottles of beer...pg57
223863 [jamison2000e] wanted to see if my program 99 bottles of beer on the wall, from (pg.57 or =
+ 223865 [shiloh.madse] bottles = 99
| + 223866 [jamison2000e] Nice =0AThanks=0A=0A----- Original Message ----=0AFrom: Shiloh Madsen <shil=
| + 223871 [gavin refine] Instead of using a 'while' loop (unless that's what the book is
| 223872 [gavin refine] Oops, I am, of course, missing one line of the song, and a nice newline
| + 223873 [jamison2000e] =0A=0Aya the books and I aren=A2t quite there yet, put it wont be=0Along wi=
| + 223874 [nepentherepr] you could drop the unless and the final line. ( num = 1, num-1 = 0 ;)
+ 223867 [sam powersou] puts '99, Bottles of beer on the wall, 99 bottles of beer,'
223870 [jamison2000e] Thanks :-}=0A=0A----- Original Message ----=0AFrom: Sammy Larbi <sam@powers=
^ Inter-thread synchronization
223882 [vikkous gmai] At his presentation for RubyConf, Koichi Sasada said that
+ 223885 [james graypr] This shouldn't be a problem for YARV (merging this month!), which has
+ 223886 [rtilley vt.e] I thought this too. I've been using green threads in Ruby lately. They are not
+ 223992 [hgs dmu.ac.u] ["and these three men made a solemn vow / Thread.critical must die" [1]]
223994 [david vallne] Hmm. The Smalltalk / Java approach? I can see where Ruby would make that
^ [rake] rule with regex executed twice for same matching string
223883 [vjoel path.b] Does anyone know why this rule is executed twice?
^ can you rubyfy this?
223887 [boris.schulz] I often read something about code being "rubystyle" though I am not
+ 223932 [jp jeffpritc] Main thing would be to replace the entrys.each { } construct with
| 223934 [david vallne] =20
| 223942 [dblack wobbl] Arriviste :-)
+ 223933 [dblack wobbl] Lose the semi-colons :-)
+ 223936 [transfire gm] Looks good. Just some small touchups. One thing to point out: Some
+ 224017 [chris.hulan ] #!/usr/bin/ruby
| 224030 [jp jeffpritc] I'm no expert either, but I'm going to have to ask for a "Man Law" from
| + 224035 [spoooq gmail] Or simply adds another upstart rival for The One True Brace Style ;)
| + 224084 [david vallne] Wax earplugs, shaking head in disbelief, and throwing foam bricks at
| 224177 [robert.dober] I will make this short, and there is no way to discuss this, it is a Go?od
+ 224070 [boris.schulz] thanks a lot for your answers! This should help me in doing stuff the
^ Re: Ruby and IBM MQ Series
223889 [reidmo gmail] Don't know if you can still use it, but there is now a complete
^ Problem with ActionMailer
223897 [acatejr gmai] I am new to ROR so I'm having a hard time figuring out how to fix this
223900 [phlipcpp yah] Prepare to slap your forehead. You are missing a t. Between the s and r. See
223901 [acatejr gmai] Wow!!! Nice catch. I think slapping my forehead has produced an
^ Unicode in irb on windows (respectively script/console in instantrails)
223898 [michael.raid] I have a problem with Unicode in irb on Windows. I recognized it when
223916 [halostatue g] The windows console -- also used by cygwin -- doesn't recognise UTF-8.
+ 223921 [support chil] A DOS console displays characters according to the OEM code page. Here is
+ 223927 [halostatue g] chcp 65001
+ 223937 [david vallne] Also the good old combo of "mode con codepage select=3D65001".
+ 223990 [michael.raid] Thank you Austin for the nice hint!
224113 [halostatue g] That's one of the caveats mentioned: batch files no longer work.
^ How to copy a file to a non existing directory ?
223905 [mchabotsol h] Is there a way to copy a file to a directory that does not exist ? If I
+ 223908 [bob.conn bti] You'll need to create the directory first with
+ 223909 [m.fellinger ] FileUtils.mkdir_p(File.dirname('c:/mart/martin.txt'))
223912 [mchabotsol h] Thanks for your helps it works fine.
^ Re: webrick-webdav(gem) served files are mounted only read-o
223906 [ruby-forum s] yes, i've also found the res["DAV"] = "1,2" but uncommenting it did not
223911 [gabriele.mar] Great work! :)
232003 [ruby-forum s] very well so! i took the time to pack the stuff and made it a gem so you
^ [ANN] DrySQL
223919 [bsevans gmai] If any of you use ActiveRecord for Object-Relational Mapping in your
^ ruby, rexml, xml, xslt...?
223925 [Christopher.] 1. I have little programming experience
223926 [TimHunter nc] Well, Ruby's a programming language and XML is a general markup
224085 [Christopher.] Thanks Timothy, this all sounds about the level I'm looking to work at
224086 [TimHunter nc] ...
^ Two way communication with the command shell (IO.popen?)
223930 [jmdjmsmith m] I would basically like to be able to run a ruby program from my rails
223943 [ara.t.howard] this is a terrifically bad idea, but here's how you'd do it
223997 [jmdjmsmith m] Thank you very much for your comments. I am basically writing a web
224012 [ara.t.howard] ah. you really need to do be able to do this then
224327 [jmdjmsmith m] Thanks once again for your comments. OK i started off by installing
^ 'exec': Operation not supported
223931 [joeat303 yah] I'm on Mac OS X / Powerbook and I'm trying to figure out why Mongrel
223988 [collinsj sea] No, I don't, but it might be a good idea to also ask on the Mongrel
^ IRB on a text widget of Ruby/Tk
223935 [nagai ai.kyu] A sample tool of Ruby/Tk is available.
^ ruby-ncurses related problems
223945 [sthalik tehr] Heya,
223980 [_mwryder wor] Isn't 10 an ASCII CR (or is it LF)?
223983 [sthalik tehr] It is. However, the Return key isn't pressed at the time.
^ Can't bind a singleton method to a subclass?
223946 [d0sboots gma] class A
223947 [dblack wobbl] The fact that B can call A.class_method is due to the special-casing
+ 223949 [ara.t.howard] still, quiet odd that one can do this
| 223959 [dblack wobbl] I think it's not so much that you're unbinding it *from* B, as that
| 223966 [ara.t.howard] class A
| 223968 [dblack wobbl] Interesting. The dot is the singleton-method indicator in that
| 223969 [ara.t.howard] i meant that B's singleton class should inherit from A's singleton class - the
| 224016 [dblack wobbl] I'm still not seeing where your example fits in with this (I assume
| 224025 [ara.t.howard] yup - this is what i was saying is needed.
+ 223950 [d0sboots gma] Thanks for the info. That's mostly what I thought - I guess I should
223957 [dblack wobbl] What I mean is: the fact that you can call B.class_method, even though
^ how to include this library into ruby?
223948 [tsayan gmail] i have download rbCurl-0.0.2a0.tgz(this library is about ftps) from
+ 223986 [collinsj sea] ruby extconf.rb
| 224133 [tsayan gmail] thank you very much everyone. i will try
+ 223987 [stefano.croc] Since this is a c extension to ruby, you need to compile this. To do so,
+ 223999 [rossrt rosco] [...snip...]
^ Why create web servers?
223953 [totalharmoni] Im just starting to get my feet wet with Ruby amd im having trouble
+ 223955 [wilsonb gmai] This piece here is a statement that not everyone agrees with.
| + 223960 [totalharmoni] Great answer Wilson
| + 224207 [robert.dober] everyone agrees with?
| + 224212 [wilsonb gmai] I just thought of one: Vim is better than Emacs.
| | + 224222 [gabriele.mar] Yes, but just if you need a soap powder.
| | + 224225 [robert.dober] Richard ;)
| + 224254 [vjoel path.b] You yourself provided the example.
+ 223956 [caldridge gm] ...
+ 223963 [jtregunna bl] Why would you ever want to implement almost anything then? It's
| 223965 [support chil] I don't think it was criticism on CatLady's part. I think she's
+ 223971 [alex deletem] 1) Because WEBrick comes with the standard library, it means other libraries can rely on it being there. For example, it's used very effectively by rubygems to create a local documentation server.
| 223974 [totalharmoni] I dont have a problem with the fun part :-)
+ 223976 [twifkak comc] ???
+ 224003 [gabriele.mar] You could want (as I do) to develop Rails applications on your
+ 224088 [david vallne] u=20
^ How can I get Ruby interact with my C++ program?
223972 [wangdong2 gm] Does Ruby have any C++ lib just like boost/python? Or thess's some other
^ understanding send
223977 [gaurav.v.bag] class MyNewClass
223984 [gethemant gm] The problem is hidden in following lines. There is no problem with
^ [ANN] Milwaukee Ruby User Group meeting toniight @ 5:30 to 8
223981 [tdjordan gma] It's that time again to hear great presentations about my
^ accessing class constants in included modules
223982 [martindemell] module Foo
224114 [agnewtj nosp] class Object
224147 [martindemell] Ah - nice!
224253 [vjoel path.b] This may be a corner case, but if you're going to define #my at the
^ Ruby Cgi Puzzle on Apache
223991 [shiwei1.zhan] On my Linux machine, I configured Mod_fcgid.2.0 in Apache2.2.3. And
224091 [david vallne] And
^ Exception catch-all
223996 [leslieviljoe] I have a script that needs to run unattended every night, and I need
+ 224000 [nospam nosit] begin
| 224008 [jan.svitok g] You should put this begin...rescue...end around each thread body you
| 224010 [leslieviljoe] Thanks, that helps.
+ 224090 [david vallne] Huh?
^ [ANN] FastRI 0.1.0: faster, smarter RI docs for Ruby, DRb-enabled
224002 [ mfp acm.org] FastRI 0.1.0: faster, smarter RI docs for Ruby, DRb-enabled
+ 224022 [leslieviljoe] Thanks for this. I see it's not working so well on Windows yet.
| 224069 [ mfp acm.org] I have pushed a patch to the 0.1 branch
| + 224136 [leslieviljoe] Yes, it was escape codes. I'll try plain.
| + 224140 [leslieviljoe] I get some strange responses on Windows. I'll test on Linux shortly.
| + 224144 [leslieviljoe] root@kadima:/etc# fri assert
| + 224145 [botp delmont] # c:\Program Files\Microsoft Visual Studio 8\VC>fri -f plain Test::Unit
| + 224154 [ mfp acm.org] As far as I can see from this and your other message,
+ 224106 [botp delmont] # FastRI 0.1.0: faster, smarter RI docs for Ruby, DRb-enabled
| 224146 [ mfp acm.org] I'll try to fix that in one of setup.rb's hooks, I'm always bumping into it :)
| 224293 [botp delmont] # > feature request: i hope fri remove the case sensitivity. eg,
| 224335 [ mfp acm.org] Should be fixed in 0.1.1, which I just released, as well as the issue with
| 224442 [botp delmont] # $ fri string.split
| 224579 [ mfp acm.org] Not right now, but it will be added (we really want this if fastri-server is
| 224751 [botp delmont] # fastri-server -b
| 224776 [ mfp acm.org] It's not your fault; it should have been created automatically when you ran
+ 224110 [craigbeck lu] I'm trying to serve my docs from one machine and have them available
| 224148 [ mfp acm.org] ============
+ 224112 [louis.j.scor] Mauricio;
| 224150 [ mfp acm.org] Thanks for reporting this; I've wrapped that code with
+ 224818 [dsisnero gma] How do you get it to index ruby gems?
| 224836 [ mfp acm.org] fastri-server searches "#{Gem.path}/doc/*/ri" for yaml files holding RI
| + 224885 [botp delmont] # FastRI remembers in which gem a
| + 224888 [dsisnero gma] Thanks,
+ 224904 [gabriele.mar] I must be missing something.
225037 [ mfp acm.org] (1)
225051 [gabriele.mar] Thank you for your detailed answer.
^ [ANN] ActiveRecord-Mimer 0.0.1
224004 [ola.bini ki.] The initial version of ActiveRecord-Mimer have been released.
^ Session Eruby.noheader problem
224005 [mbubi libero] i have installed Ruby and Apache on Windows Machine.
^ Re: the name of Matz
224006 [andreas.kroh] ...
^ win32ole and excel and copy
224007 [chen_li3 yah] I use wind32ole to import data and create graphs into Excel. I find the
224024 [ghalsey yaho] require 'win32ole'
224082 [chen_li3 yah] I try the script but I find it only open an designated file only. I
^ replacing a formula from a string
224009 [josselin wan] I have a long formula expressed as a string
224125 [nospam nosit] The simplest way to solve this problem is to convert your equation into a
^ #returning and #tap
224013 [transfire gm] Had use for this today: #returning is a convenience method you'll find
+ 224015 [james graypr] One of the comments to the original article combines both methods
| 224032 [transfire gm] Oh yea! I remember #with from way back, but then I don't recall anyone
| 224034 [spoooq gmail] Just realised that of course tap != k :P
+ 224019 [invalid gmx.] [about #returning and #tap]
+ 224028 [spoooq gmail] MenTaLguY's use cases seem the more convincing of the two. Why would I
+ 225210 [drbrain segm] So... it usually doesn't save any lines, it adds typing, it hides the
+ 225215 [transfire gm] Er... that seems a backwards and inconsitant interpretation. How can it
| 225222 [drbrain segm] Most of the time it adds code. Look at the two examples on the blog
| 225239 [transfire gm] Well, it does add structure, otherwise there would be not be any point
+ 225233 [vjoel path.b] class Object
+ 225234 [vjoel path.b] Oops, sorry. I didn't realize that #tap is the same as #then.
| 225236 [hal9000 hype] I suppose it's as in "tap a keg." :)
| + 225243 [vjoel path.b] A tee branches. Does a keg tap branch?
| + 225255 [martindemell] More likely tap as in "tap a phone line", i.e. both siphon off a value
| 225309 [louis.j.scor] I think where returning really makes a difference is with local
| 225323 [ryand-ruby z] I realize this is a contrived example on your part, but you did
| + 225324 [james graypr] def foo(a)
| + 225335 [louis.j.scor] No. You're absolutely right that this was a useless, contrived
+ 225358 [drbrain segm] $ wc
+ 225370 [ara.t.howard] and quite easy to golf if line count matters that much
| + 225375 [louis.j.scor] def foo; @foo ||= Foo.new.instance_eval{ self.bar = 'bar'; self } end
| + 225382 [vjoel path.b] ROFL
| + 225385 [dblack wobbl] I'm not getting the semantics of "then". Do you mean "then" as in, "I
| | 225388 [vjoel path.b] Yes. Not much better than #tap, is it? Any ideas...? "and_then"?
| | + 225393 [dblack wobbl] "whereupon" :-) I guess it's hard to find a name that's general
| | | 225399 [vjoel path.b] Does the following technique seem odd?
| | | 225420 [dblack wobbl] Part of what's odd to me about #then is that it's not
| | | 225476 [martindemell] "then" actually works fine for me there, Englishwise. Maybe and_then
| | | 225488 [dblack wobbl] I wonder if there's some name that embodies the fact that the object
| | | + 225492 [martindemell] Good point! I thought of "pipe" but even that doesn't say that it
| | | | 225498 [dblack wobbl] Although... there might be cases where disturbing the object would be
| | | | 225508 [rosco roscop] Sweet!
| | | | + 225510 [spoooq gmail] Noooooooooooo! Stop this meme now before it hurts someone!
| | | | + 225657 [dblack wobbl] I rather like it too :-) I guess if too many of them got chained it
| | | + 225494 [spoooq gmail] I definitely think of it as tapping a phone line.
| | | 225495 [spoooq gmail] Actually, how about giving the proc a copy of the object, rather than
| | | + 225496 [martindemell] Thought of that, but not everything responds to dup (nil and symbols, e.g.)
| | | | 225497 [spoooq gmail] Can those cases be worked around?
| | | | 225499 [dblack wobbl] I don't think dup'ing plays well with the intent, which is to do a
| | | | 225500 [spoooq gmail] The original object -is- getting passed through... the point is to
| | | | 225501 [dblack wobbl] I see what you mean. Well, as per my gsub! example, I think modifying
| | | | 225503 [spoooq gmail] This can be rewritten using existing keywords tho... if you want to
| | | | 225551 [dblack wobbl] I'm afraid I don't follow. Can you show how you'd write this in the
| | | | 225857 [spoooq gmail] What I mean is to chain with gsub instead, or to make it obvious that
| | | | 225861 [spoooq gmail] I think I need to make this more explicit for it to be clear. Only the
| | | | 225882 [dblack wobbl] You're mixing real and quasi-pseudo-code examples here, though. One
| | | | 225899 [spoooq gmail] Sorry, this was a really bad example from me... I meant the equivalent
| | | | 225902 [dblack wobbl] I'll just add that I now see exactly what you mean about mixing the
| | | + 225505 [transfire gm] "Do as if frozen". Perhaps #freeze could take a block?
| | | 225507 [spoooq gmail] Nice. Sounds very reusable.
| | + 225404 [ara.t.howard] class Object
| | | 225416 [vjoel path.b] To me, "as do" doesn't read as well as "then do".
| | + 225504 [transfire gm] well, #with is the other common synonym. but #returning seems as well.
| + 225402 [ara.t.howard] heh.
+ 225381 [vjoel path.b] But you have to type @foo _five_ times, instead of once. Oh, well. It's
225411 [drbrain segm] No, just @<Tab>. I like my friendly editors.
threads.html
top