302945-304038

302693-303084 subjects 303151-346817

SQLite synchronous (was Re: Yup, it's call SQLite! :-)) Re: Is there a One  TruePostgresinterface? Is Ruby-postgresmaintained?)
302945 [petite.abeil] Take a look at PRAGMA synchronous = FULL | NORMAL | OFF
302954 [vjoel@pa h. ] Thanks to you and Philip for the good suggestions... will digest them

Problem accessing hash table
302958 [anukul.singh] I am facing the following problem, when using the following code
302962 [caduceass@gm] In your example, you have a Hash instance as an element of an Array

How to catch STDIO STREAM?
302961 [happy.go.luc] How can I capture a error massage from the STD IO?
+ 302963 [AEtzold@gm .] Dear Cheyne,
| 302965 [happy.go.luc] Thank you for your information. I tried, but it only give me result like
| 302967 [AEtzold@gm .] Dear Cheyne,
+ 302995 [shortcutter@] foo.exe > errors.txt
  303035 [sepp2k@go gl] I'm sorry, I don't know Windows that well, but wouldn't that redirect stdout
  303060 [shortcutter@] Correct.

Unit testing an HTTP client
302970 [towb@gm .n t] my programm uses the HTTPClient gem to call a backend that was
302971 [jmettraux@op] I've been through the same routine for an http client
+ 303108 [towb@gm .n t] <983752850805261623s5b91b589n709f86102e939dbf@mail.gmail.com>,
+ 303117 [towb@gm .n t] Works really nice. Thanks!

ruby lookups(=python dict)?
302976 [notnorwegian] what is the easiest way for a dict like in python?
+ 302977 [ara.t.howard] gen install orderedhash
| 302979 [cmdjackryan@] ~  ^^^
+ 302978 [botp@de mo t] # what is the easiest way for a dict like in python?
+ 303013 [davebass@mu ] The easiest solution is to use a hash, which is built into the language.

make hashtable out of 2 strings
302980 [notnorwegian] i have 2 strings, i want to take for each char in string1 the same
+ 302981 [funkaster@gm] something like this?
+ 302982 [botp@de mo t] # i have 2 strings, i want to take for each char in string1 the same

What is ?E in str.index(?E)...
302983 [atul.khot@gm] Dear all
+ 302984 [ara.t.howard] p ?A
+ 302992 [kamhung.soh@] "You can also get the integer value corresponding to an ASCII character

a problem ask for help
302985 [smellcode@gm] ...

string+char, cant convert nil, but not nil
302986 [notnorwegian] tryong to do a ROT13(http://en.wikipedia.org/wiki/Rot_13) encrypter/
302990 [botp@de mo t] # tryong to do a ROT13(http://en.wikipedia.org/wiki/Rot_13) encrypter/

Question on OpenURI
302987 [srijayanth@g] #! /usr/bin/ruby
302988 [dave@pr gp o] How big is the second one?
302989 [srijayanth@g] Large.

Download & use TK GUI application
302991 [pranjal.jain] Can anyone tell me from where I can download TK & use it in Ruby. Which
+ 302993 [kranthicu@gm] ...
+ 303019 [fox@ns l. su] Can't tell you which version to use. Where to get Tcl/Tk most easily to

The creator of Ruby explains why Ruby sucks
302996 [email@fi .t ] ...
302998 [shortcutter@] Your point being?  This is old stuff.
302999 [non.sto.gioa] nothing. i read this on ycombinator and thought it's interesting: let's
303005 [shevegen@li ] 5 years ago already

RubyGarden.org down?
303001 [james.britt@] Service Temporarily Unavailable
303140 [tom@in oe he] Back up now... but running slowly. I'm on the hook for moving this to a
303146 [james.britt@] Thanks!

documentation for ruby?
303002 [notnorwegian] i think the documentation at http://www.ruby-doc.org/ is fairly
+ 303003 [shortcutter@] According to what standards?
| 303007 [shevegen@li ] The pickaxe book is probably better overall.
| 303008 [shortcutter@] The pickaxe is actually linked from the site the OP mentioned.
+ 303021 [fox@ns l. su] What sort of documentation are you looking for reference? tutorial?
  303028 [waratuman86@] ...
  303032 [robert.dober] Please do not top post this community (as many others) prefer bottom
  303034 [mark@mw ld n] Many others don't mind it either way, and if the quote trail is long,
  + 303037 [victor.reyes] ...
  | 303039 [caduceass@gm] This is top posting.
  | + 303044 [victor.reyes] ...
  | | 303061 [fburton@ny .] Yes, except you managed to include a superfluous > quote mark
  | + 303046 [mark@mw ld n] Only if a single email is regarded as a conversation. In actuality,
  |   + 303049 [towb@gm .n t] Top or bottom isn't the point, inter-quoting vs. TOFU is. (the latter
  |   | 303067 [mark@mw ld n] Probably. However, consider the history of written communication. When
  |   + 303062 [cmdjackryan@] Condensing what has been said by somebody else actually is a honored
  |   | 303072 [mark@mw ld n] It may be an honored practice, but it doesn't usually happen because
  |   | 303091 [cmdjackryan@] That's good for you. But 6 billion people aren't you. Do you apply your
  |   + 303064 [caduceass@gm] Yes.  It's a group discussion.  You go to the bathroom during it, and
  |     303066 [cmdjackryan@] In my experience, the TOFU style is most common in business and business
  + 303042 [towb@gm .n t] In Usenet pro-toppers are extremely rare.
  | 303048 [mark@mw ld n] There probably are no "pro-toppers." But I would imagine that there
  + 303051 [robert.dober] I have never seen anybody plead for top posting, I have however very
    303068 [jmaher@jd ah] As a matter of personal preference, I prefer what seems to be called
    + 303106 [jeremymcanal] I top post because Gmail sets it up that way when I hit reply.
    + 303137 [saji@ap c2 .] I agree fully with James - this style of replying seems more natural to

Ruby on zLinux
303012 [eric.dickins] We are trying to install the MySQL gem on RH51
303166 [eric.dickins] Am I in the right thread for this?
303235 [hassan.schro] Yes, but it's such a trivial issue --
303334 [eric.dickins] I have been looking for it with find and grep.

Directionality of comparasion operators
303014 [towb@gm .n t] maths says that the value of expressions like x == y and y == x is
+ 303022 [rick.denatal] === is not, and is not intended to be the same as ==, nor is it
+ 303033 [mark@mw ld n] There are other operators that aren't commutative (like /), but it
+ 303038 [caduceass@gm] Operators depend on context (think of the use of <).  === is no
  303041 [mark@mw ld n] I like the moniker David Black cites: "the threequal operator."
  303047 [rick.denatal] It's cute, but I think it gives the wrong impression that === is
  303050 [mark@mw ld n] Since case statements are traditionally about comparing values (in
  303052 [towb@gm .n t] =    assignement
  + 303056 [rick.denatal] No, I don't think that
  + 303057 [mark@mw ld n] Except that likeness is commutative. If one thing is like another,
    303059 [towb@gm .n t] Right. The match operator =~ clearly looks directional.

Problem reading small files - stringio problem?
303015 [singeo.sg@gm] where I'm going wrong. The small files (less than 20k?) that I read in
+ 303025 [boesemar@gm ] I think your problem is: open('sample.txt', 'w'). You either open a file for
+ 303026 [shortcutter@] This has nothing to do with StringIO.  You do not close all your file
  303063 [singeo.sg@gm] Martin/Robert, thank you both for your quick replies. Both your

Pickaxe 3 applicable to 1.8?
303020 [towb@gm .n t] working with ruby 1.8 I use my paper Piackaxe 2 for reference. But I
303189 [coder68@ya o] Tobias,

Ruby with Power over Ethernet (PoE) camera
303030 [fmpfmpf@ya o] i want to program a GUI for this camera

n00b question
303045 [tim.wolak@gm] Can someone explain to me why my script is printing the key to my hash
+ 303089 [caduceass@gm] Tim, are you trying to do something along the lines of this? (spacing
| 303105 [caduceass@gm] ...some code that didn't paste correctly (the spaces).
+ 303154 [shortcutter@] You are printing key and value of your hash and since the value also
  303155 [shortcutter@] Here's an alternative

Re: Top-posting
303065 [mark@mw ld n] You're missing my point. No one would plead for top posting. What I
+ 303069 [caduceass@gm] It's funny.  Friends and acquaintances do this all the time to me,
| 303070 [mark@mw ld n] These guidelines are not commonly accepted.
| 303096 [fburton@ny .] Maybe not in toto, but the bit about bottom posting is!
| 303123 [mark@mw ld n] That's just an assertion, Francis, and frankly, it's formed the basis
| 303157 [fburton@ny .] It's a convention bases on sound (imo) arguments. Why bottom-posting
| 303165 [ninja@sl ph ] I'm not sure how much has been said so far (archives don't seem to be keeping
| 303168 [fburton@ny .] Not from me. Your post made some good points and I enjoyed reading it.
+ 303071 [fburton@ny .] What proportion of posts (or posters) are top-posting? Less than
  + 303074 [mark@mw ld n] That's rare. Not to mention irritating. And if I'm in that situation
  | 303075 [mark@mw ld n] Yeah, that Page Down key's a real bitch, innit? :)
  | + 303077 [avdi@av i. r] 1. Top-posting is rude and bad form in a technical forum.
  | | + 303079 [vjoel@pa h. ] Well put.
  | | | 303092 [robert.dober] Really, I am quite surprised that some people interpret it like that,
  | | | + 303094 [mark@mw ld n] I'm talking about how my mind works, and why I feel the way I do. I
  | | | | 303102 [cmdjackryan@] The answer to that is a resounding 'depends'. In 80% of cases, I have to
  | | | | + 303107 [billk@ct .c ] Odd... I've been on Usenet since 1986, but my recollection is
  | | | | | 303118 [mark@mw ld n] Actually, my experience was somewhat the opposite. I started on GEnie,
  | | | | + 303122 [mark@mw ld n] I participate in a number of groups. If I don't keep up with them on a
  | | | + 303100 [caduceass@gm] An interesting thing about using languages like Ruby is that we
  | | |   303120 [mark@mw ld n] The way I read email is with the mouse. I'll click on each subject
  | | |   303158 [fburton@ny .] Ah, ancient technology - explains a lot! ;-)
  | | + 303085 [caduceass@gm] This point I agree with, because the advocacy part comes across as a
  | |   303115 [james.britt@] I've tried that, got poor results, and now take a simple approach:  I
  | |   + 303124 [mark@mw ld n] Thanks - that exactly expresses why (in some cases) I think top-
  | |   | + 303127 [shevegen@li ] You guys have somehow turned this away from the documentation-aspect,
  | |   | + 303128 [james.britt@] Well, if you honestly think others will find it easier to read your
  | |   |   + 303130 [mark@mw ld n] I've already explained under which circumstances I believe that to be
  | |   |   + 303143 [vjoel@pa h. ] Personally, I find it much easier to read posts that are written with
  | |   |     303144 [mark@mw ld n] You do _not_ want to get me started on that, trust me. :)
  | |   |     + 303147 [mikael@ho lu] /* vim: set ts=3D2 sw=3D2 sts=3D2 ai */
  | |   |     + 303172 [robert.dober] So we finally found something to agree upon :). Maybe we have all said
  | |   + 303160 [fburton@ny .] Same here, with some guidance from the display that appears at
  | |     303162 [davebass@mu ] Dear oh dear oh dear! What a lot of fuss about nothing. ;-)
  | + 303090 [cmdjackryan@] Never underestimate the power of defaults. Do you think it is due to
  + 303076 [mark@mw ld n] I don't think that's true, but I don't have any firm evidence either
  + 303087 [gareth.adams] Maybe I'm missing some irony or sarcasm here, but I see this mistake a

Another problem with -> LoadError: no such file to load
303080 [csgyuricza@g] I am trying to install and use the file-tail gem, but it's just not
303082 [alex.doan@wa] Require 'file/tail'=20
303086 [csgyuricza@g] es/File/Tail.html

Can someone explain this syntax in new?
303093 [robb.shecter] "Here's a Hash that automatically creates new hashes for each key you
+ 303095 [sepp2k@go gl] No, it calls new and passes the above block to it.
| 303101 [robb.shecter] Ah hah.  I see; this is a particular feature of the Hash class -- one of
+ 303098 [stefano.croc] If you look at the ri documentation for Hash#new, you'll see that it can be
+ 303099 [Gennady.Byst] No, this is calling new() with a block. In this case, for keys that are not yet in the hash, the specified block will be called with 2 parameters: one is the hash object itself, and the second one a key being accessed. This gives you an opportunity to initialize a value at that key appropriately (in the example before, it is initialized to another hash - {} is a literal for a hash, equivalent to Hash.new).

Gem configuration options
303103 [jlambert@oh ] How do you pass configuration options to extconf.rb when installing a gem?
303126 [drbrain@se m] gem install ruby-gd -- --configure-options
303129 [TimHunter@nc] Is that a new option? I thought it was --build-flags.
303142 [drbrain@se m] want to specify.
303164 [TimHunter@nc] That makes sense. Thanks.

Writing event hooks called from C extensions
303104 [mlangenberg@] Just for educational purposes, I'm trying to write a Ruby-C extension
+ 303181 [jan.dvorak@k] Not really, the problem is, ruby isn't exactly multi-threading atm (somebody
+ 303194 [mlangenberg@] On #ruby-lang, drbrain explained to me that I should run my event loop

tech writer seeks to build portfolio with a ruby project
303109 [michael@sc m] ...
+ 303110 [cmdjackryan@] Ruby's STDLIB could use some documentation love. :)
| 303113 [james.britt@] Indeed.
| 303675 [michael@sc m] ...
| 303678 [TimHunter@nc] Download and unroll the source tarball. The builtin classes are defined
+ 303135 [znmeb@ce ma ] Funny you should ask ... a few weeks back, Gregory Brown was soliciting
| 303292 [michael@sc m] ...
| 303317 [ninja@sl ph ] I don't know if it's been mentioned yet, but Capistrano lacks quite a lot of
+ 303136 [saji@ap c2 .] The Dennou Ruby project, a suite of software for geophysical data

unsubscribe
303112 [hraducan@gm ] ...

[OT} Problems with pasting using Gmail, anyone else?
303116 [caduceass@gm] I've posted code with correct spacing (indent of 2 spaces) by pasting
+ 303119 [caduceass@gm] Never mind.  It turns up just fine at the code I was originally
+ 303121 [caduceass@gm] Confirmed this to be a problem with gmail and/or the

Building on Solaris and trouble with missing libcrypt_d
303131 [justinandton] I have a Solaris zone that I use to build Ruby on and then I deploy it
303132 [justinandton] In case it helps...

Rails tool, advice much appreciated
303133 [elizabethbar] This a free resource for learning/finding info on Ruby on
+ 303134 [mark@mw ld n] I don't think a programming language lends itself well to the
| 303163 [albertschlef] Flash cards aren't meant for "finding the answer". That's because
| 303231 [mark@mw ld n] That's exactly what I meant. Since programming _is_ about "finding the
| 303241 [ninja@sl ph ] But learning a framework is very different than learning to program.
| 303259 [mark@mw ld n] I've been posting way too much here lately, so I'll just say that if
| 303279 [ninja@sl ph ] Not looking for a job (yet), but I actually tend more towards keeping
+ 303167 [raju.gandhi@] ...
| 303169 [albertschlef] Yeah, this bothered me as well.
+ 303173 [fox@ns l. su] I don't like the definition of Mongrel.  Mongrel is a web server.

[ANN][ADV] One week left on the Ruby Hoedown CFP!
303139 [jeremymcanal] You've got just about a week left to get your proposals in for a talk

[ANN] JRuby 1.1.2 Released
303141 [Thomas.Enebo] The JRuby community is pleased to announce the release of JRuby 1.1.2!
303145 [james.britt@] Thanks for the outstanding work.
303223 [robert.dober] You can say that man, my first tests run almost twice as fast as

The duck's backside
303150 [towb@gm .n t] as a newcomer I miss method overloading with named parameters and types
+ 303153 [shortcutter@] You cannot expect to carry your Objective-C style of programming over
| 303159 [towb@gm .n t] <9e3fd2c80805280159y5bad0a73tbc4f845f90246580@mail.gmail.com>,
| 303171 [eleanor@ga e] def doit a, b, c = nil
| 303179 [towb@gm .n t] <9560F017-58CA-48EB-BCC3-3B16758516C1@games-with-brains.com>,
| + 303190 [shortcutter@] You can do
| + 303202 [eleanor@ga e] Which makes things simpler ;)
|   303215 [mark@mw ld n] This looks like a great solution!
|   303224 [eleanor@ga e] That'd be marginally more readable but to my mind it's overly
|   303236 [mark@mw ld n] The only point of using Ruby (or any other tool in the universe) is to
|   + 303240 [ninja@sl ph ] Put it this way: What's the point of using, say, Erlang, if you never use its
|   | 303255 [mark@mw ld n] All I can do is repeat what I said: the ONLY point to ANYthing (in
|   | + 303278 [ninja@sl ph ] Even if the problem doesn't require concurrency, the main reason for choosing
|   | | 303284 [mark@mw ld n] Wasn't my use case. :)
|   | | 303286 [ninja@sl ph ] My mistake, sorry about that.
|   | + 303289 [avdi@av i. r] Not really, no.  That reflects an attitude that has more to do with
|   | | 303296 [mark@mw ld n] I must respectfully disagree. I learned OOP (in 1989) before C++ was
|   | | + 303304 [towb@gm .n t] My code worked before I started the thread. Like many posts around here
|   | | + 303307 [billk@ct .c ] There are more ducks in heaven and earth, Horatio, than are
|   | | | 303511 [mark@mw ld n] Good point.
|   | | + 303315 [ninja@sl ph ] That's interesting.
|   | | | 303504 [mark@mw ld n] ...
|   | | | + 303528 [robert.dober] A convenient tool for specifying behavior and using inheritance and
|   | | | + 303692 [ninja@sl ph ] Classes are categories. But not all categories are classes.
|   | | |   + 303696 [mark@mw ld n] ...
|   | | |   | 303697 [ninja@sl ph ] Depends very much on context, and on the definition of "wrong". It's a
|   | | |   + 303744 [robert.dober] IMHO this is a gross generalization!
|   | | |     303798 [ninja@sl ph ] Give me an example of a class that isn't a category.
|   | | |     303801 [vjoel@pa h. ] class MyNil
|   | | |     303806 [ninja@sl ph ] it's
|   | | |     + 303839 [robert.dober] I know I do not have the communication talents of Jo=EBl and David, well
|   | | |     + 304038 [avdi@av i. r] Humans are a category of animal with certain characteristics which set
|   | | + 303322 [dblack@ru yp] Dave Thomas, who coined the term "duck typing", has described it as
|   | |   + 303329 [robert.dober] I have to admit that I was quite disappointed that my implementation
|   | |   | 303332 [dblack@ru yp] s/Dave/David/ :-)
|   | |   | 303360 [robert.dober] s /^/So sorry, why does this always happen to me?/
|   | |   + 303508 [mark@mw ld n] No, you cannot possibly measure with certainty what an object does
|   | |   | + 303523 [towb@gm .n t] As far as I'm concerned objects do not have a type, only variables do.
|   | |   | + 303544 [vidar.hoksta] But in Ruby knowing an objects class and an ancestors is not
|   | |   | + 303546 [eleanor@ga e] There are many other kinds of runtime error than that, and it will be
|   | |   | + 303572 [dblack@ru yp] I mean you can measure what it's done after it's done it. I don't mean
|   | |   |   303694 [ninja@sl ph ] you
|   | |   |   303695 [dblack@ru yp] I'm thinking of the effect, though. When you send a message to an
|   | |   |   303729 [eleanor@ga e] Exactly.
|   | |   |   303731 [shortcutter@] <snip/>
|   | |   |   303733 [eleanor@ga e] As is often the case on big C++ and Java projects where complexity (in
|   | |   |   303742 [dblack@ru yp] I took an extended look at Eiffel 10 or 12 years ago, and thought it
|   | |   |   303752 [rick.denatal] ...
|   | |   |   303788 [robert.dober] Do you mean it works like the TGV but nobody really knows why? Ok I
|   | |   + 303780 [riko@de pa m] Do you know when he actually started speaking about "duck typing"?
|   | |     + 303783 [dblack@ru yp] No, I don't know exactly when it was.
|   | |     | 303787 [riko@de pa m] That is because the first time *I* read about duck typing was in a post
|   | |     + 303792 [marcelo.maga] Did he?  I learned the term in connection with Python, a long long
|   | |       + 303793 [dblack@ru yp] I could be wrong about Dave having coined it. If it walks like a
|   | |       | + 303796 [shevegen@li ] I think "duck typing" might be older than python as well
|   | |       | + 303797 [rick.denatal] ...
|   | |       |   + 303807 [dblack@ru yp] And I'll take "stereotyping" :-)
|   | |       |   + 303856 [vjoel@pa h. ] I hereby claim "turducken typing", but I have no idea what it means. ;)
|   | |       |     303858 [vjoel@pa h. ] Proposed definition: code that combines chicken and duck typing and
|   | |       + 303886 [riko@de pa m] No. As far as I know, he did not.
|   | + 303291 [eleanor@ga e] I used to_int because it happened to be the synonym that popped into
|   | | 303311 [fred@la av .] - The object has a valid numeric value (via .to_i(nt) in your case),
|   | | 303510 [mark@mw ld n] Man, I'm really not giving these replies the attention they deserve, =20
|   | | + 303542 [eleanor@ga e] That's why I said it was a static typing _mindset_ - because it's =20
|   | | + 303551 [billk@ct .c ] I don't see variables in ruby as having any type at all.  They merely
|   | + 303323 [ttmrichter@g] One of the weaknesses of classic Booch, et al OOP is that one of the
|   |   303512 [mark@mw ld n] ...
|   |   303530 [koflerjim@ma] The three pillars of Object Orientation
|   + 303290 [eleanor@ga e] No, it states that v inherits from the base class Numeric, and that is
+ 303178 [robert.dober] The first idea would be to do something like the following
+ 303217 [jim.menard@g] Tobias,
  303246 [john.carter@] Yes and No.
  + 303249 [ninja@sl ph ] buggyline nowhere on the backtrace!
  | 303269 [john.carter@] Depends on what I'm doing. If I'm just doing bog standard coding, I'll
  + 303250 [ninja@sl ph ] object to respond to :#{symbol}, but found class
threads.html
top