[#372900] gems install failed — wroxdb <wroxdb@...>
Hello,
[#372908] data::dumper for ruby? — wroxdb <wroxdb@...>
how to dump a complicated data structure with ruby?
[#372911] create a shell within an app — Rahul Kumar <sentinel1879@...>
I have a client application - often i am needing to explore/inspect the
[#372919] Evented programming — Christoph Jasinski <christoph.jasinski@...>
Hi
[#372936] Standard Base62 Encoding? — Intransition <transfire@...>
Is there a standard encoding for base62? I've been using 0..9a..zA..Z,
[#372953] Strange whitespace parsing behavior on Ruby 1.8.7 (patchlevel 249/302) — Ehsanul Hoque <ehsanul_g3@...>
On Tue, Nov 2, 2010 at 5:49 AM, Ehsanul Hoque <ehsanul_g3@hotmail.com> wrot=
On 02.11.2010 17:15, Ehsanul Hoque wrote:
Ehsanul Hoque wrote:
[#372961] get method name when aliasing — Rahul Kumar <sentinel1879@...>
I'd like to know the current method name or alias used, as follows:
[#372977] Local server-client communication — Javier 12 <jvalencia@...>
Hi, i'm coding a linux local server (daemon) and it will have a command
On 11/02/2010 07:51 AM, Javier 12 wrote:
[#372982] Printing out contents of 2 arrays using a loop — Paul Roche <prpaulroche@...>
Hi. I'd like to print out the contents of 2 arrays as follows........
[#373003] Inversion of Control in Ruby by passing classes - does it make any sense? — Manuel Kiessling <manuel@...>
Hello everyone,
On 11/2/2010 3:01 PM, Manuel Kiessling wrote:
On Tue, Nov 2, 2010 at 9:29 PM, Jeremy Bopp <jeremy@bopp.net> wrote:
On 11/3/2010 5:20 AM, Robert Klemme wrote:
[#373011] Speech Recognition — Jonathan Bale <webmaster@...>
Where would I start if I wanted to create some small programs/scripts
[#373013] Regular Expression — Dv Dasari <dv.mymail@...>
I am trying to write a reqular expression to match a word with my input
On Tue, Nov 2, 2010 at 9:05 PM, Dv Dasari <dv.mymail@gmail.com> wrote:
On Tue, Nov 2, 2010 at 3:34 PM, Richard Conroy <richard.conroy@gmail.com> wrote:
Kendall Gifford wrote in post #958838:
regex =3D /^(A(?!A)|B(?!B)|C(?!C)|D{1,2}(?!D))+$/
On Thu, Nov 4, 2010 at 5:46 AM, Mike Cargal <mike@cargal.net> wrote:
On Thu, Nov 4, 2010 at 11:27 AM, Kendall Gifford <zettabyte@gmail.com> wrot=
On Thu, Nov 4, 2010 at 4:53 PM, Mike Cargal <mike@cargal.net> wrote:
grrr......
[#373037] i really need your help! — "Sia F." <dj_sia_x@...>
hello, i'm from greece! and i need some help in one contest! this is my
On Wed, Nov 3, 2010 at 2:03 PM, Sia F. <dj_sia_x@yahoo.com> wrote:
[#373049] UTF-8 aware chop for 1.8? — Ammar Ali <ammarabuali@...>
Hello,
Ended up making my own. Posting it here for the benefit of others, and
I was going to say
On Wed, Nov 3, 2010 at 5:57 PM, James Edward Gray II
On Nov 3, 2010, at 11:33 AM, Ammar Ali wrote:
[#373070] Ruby Perofrmance — Ruby Me <i_baseet@...>
Hi
Ruby Me wrote:
Ruby Me wrote:
[#373078] Ruby 1.9.2 with Rails 3.0.1 — Bharat Ruparel <bcruparel@...>
Is there a problem with Ruby 1.9.2 p0 being able to process unicode
[#373097] Ruby vs PHP for the web — Ruby Me <i_baseet@...>
Hi
On Wed, 3 Nov 2010 20:49:22 -0500, Ruby Me <i_baseet@hotmail.com>
Charles Calvert wrote in post #960599:
On Thu, Nov 11, 2010 at 11:50 PM, Mike Stephens <rubfor@recitel.net> wrote:
2010/11/12 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>
On Fri, Nov 12, 2010 at 1:54 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
Robert Klemme wrote in post #960960:
Thank you guys,
For creating a web application, you need to use ruby on rails and not
PHP has more lines of code in the actual File than ruby. If you take a
[#373103] Ruby Time - Sports Time — flebber <flebber.crue@...>
Hi I am reading the time classes for Ruby. However I can't figure out
[#373110] Can I run windows command line app interactively? — "Cai I." <cai.inception@...>
I want to do something like this:
[#373117] Splitting a string into characters - not bytes — Peter Hickman <peterhickman386@...>
I realise that this is probably a known thing but my google-fu is not
MjAxMC8xMS80IFBldGVyIEhpY2ttYW4gPHBldGVyaGlja21hbjM4NkBnb29nbGVtYWlsLmNvbT46
Thank you thank you thank you
On Thu, Nov 4, 2010 at 1:02 PM, Peter Hickman
[#373118] true! or false! — Intransition <transfire@...>
Making good use of polymorphism I had this idea for assertion methods:
[#373131] Any emacs user here? — Thomas Yao <t.yao426@...>
I'm now using Sinatra and I'm an emacser
[#373153] 1.9 CSV Parsing Issues — Kenny Lam <kenneth.lam@...>
I'm currently porting a script to 1.9 and I'm having problems getting
[#373175] ssl encryption with post_form() — Robbie Mckennie <robmckennie@...>
im writing a program that needs to post a form, and iv found that i can
[#373188] require problem — Roni Kekkonen <roni.kekkonen@...>
Hello. I am working with the book "Everyday scripting with Ruby" (The
[#373202] bulding a crash-proof eval(), is it possible? — Nick Brown <nick@...>
I'm building an app which must execute user-submitted bits of Ruby code.
On Friday 05 November 2010, Nick Brown wrote:
[#373207] install text editor without adminstrator previlege — Li Chen <chen_li3@...>
Hi all,
Am 05.11.2010 22:03, schrieb Li Chen:
[#373219] Maybe not a Ruby question but I still need to know — Kaye Ng <sbstn26@...>
I'm using windows XP. I save my practice files in my thumb drive -
On 10-11-06 02:19 AM, Kaye Ng wrote:
[#373220] Create a class - ideas — flebber <flebber.crue@...>
On Nov 7, 11:06=A0am, Mike Cargal <m...@cargal.net> wrote:
[#373227] random bug in the & (set intersection) operator in Arrays — Jean-Christophe Le Lann <jean-christophe.lelann@...>
Hi
On 06.11.2010 17:08, Jean-Christophe Le Lann wrote:
[#373231] ANN: Ruby Underscore 0.1.0 Released — Daniel Ribeiro <danrbr@...>
= RubyUnderscore
[#373242] ruby archive network — "Eva" <eva54321@...>
Jm5ic3A7SXMgdGhlcmUgYSBwbGFjZSBsaWtlIFBlcmwncyBDUEFOIGZvciBydWJ5J3MgbGlicmFy
[#373246] Meaning of :: — Guido Granobles <guido-granobles@...>
Hi!.. I'm very new with Ruby and I wold like to know what does it mean
[#373248] Code in a class but not in a method -- please explain! — "Bruce F." <brucedfeist@...>
I'm a newcomer to Ruby, and I'm confused about what executable
On Sat, Nov 6, 2010 at 10:22 PM, Bruce F. <brucedfeist@gmail.com> wrote:
Andrew Mcelroy wrote in post #959869:
On Sun, Nov 7, 2010 at 6:50 AM, Bruce F. <brucedfeist@gmail.com> wrote:
[#373260] sort_by is not stable ? — Michel Demazure <michel@...>
sort_by is not a stable sorting method (ruby 1.9.2 p0)
On Sun, Nov 7, 2010 at 12:22 PM, Michel Demazure <michel@demazure.com> wrot=
Ammar Ali wrote in post #959889:
On Sun, Nov 7, 2010 at 1:15 PM, Michel Demazure <michel@demazure.com> wrote:
On 07.11.2010 12:39, Ammar Ali wrote:
Please, people, trim your quotes.
Phillip Gawlowski wrote in post #959912:
On Sun, Nov 7, 2010 at 2:08 PM, Michel Demazure <michel@demazure.com> wrote:
On 07.11.2010 15:10, Phillip Gawlowski wrote:
On Nov 7, 12:34=A0pm, John W. Higgins <wish...@gmail.com> wrote:
Good Afternoon
[#373266] irb misbehaviour with arrow keys on Windows — Marvin Gülker <sutniuq@...>
Hi there,
[#373288] why was my mail sent twice?(no ruby-related) — 冷雨 <raincolee@...>
During using the mailing list I always send my mail twice.(see in "sort_by
[#373330] Identify IP address from a text file and replace it with new address. — Chandu80 <chandu.shenoy@...>
Hello All,
[#373333] Comparing/search struct array — Szabolcs Tóth <tsz@...>
Hi,
2010/11/8 Szabolcs T=C3=B3th <tsz@purzelbaum.hu>
[#373342] Using Ruby's C API safely and sanely — Eric MSP Veith <eveith@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#373352] ruby-pg gem fails to install — Rajinder Yadav <devguy.ca@...>
i built postgres 9.0 from source and i am trying to install ruby-pg
On Mon, Nov 8, 2010 at 12:52 PM, Rajinder Yadav <devguy.ca@gmail.com> wrote:
On Mon, Nov 8, 2010 at 4:01 PM, Ben Bleything <ben@bleything.net> wrote:
Just ran into the same thing myself... installing 'libpq-dev' seemed to
[#373397] Analyzer for errors in code ? — David Unric <dunric29a@...>
Hello,
On Tue, Nov 9, 2010 at 5:00 PM, David Unric <dunric29a@gmail.com> wrote:
Robert Klemme wrote in post #960353:
Ryan Davis> Yep, I really understand it's impossible to do static
Ryan Davis wrote in post #960436:
[#373409] String#split regex \W on non-ASCII text — Fritz Anderson <fritza@...>
Ruby 1.9.2-p0, built from the tarball on Mac OS X 10.6.4 with the Xcode
[#373421] help with code, new to programming — Steve Rees <stevoreesimo@...>
I am new to programming and have been learning Ruby using online
On Tue, Nov 9, 2010 at 11:31 PM, Steve Rees <stevoreesimo@hotmail.com> wrote:
[#373441] "puts, if and unless" VS "nil" — Edmond Kachale <edmond.kachale@...>
Rubysters,
On Wed, Nov 10, 2010 at 2:26 PM, Edmond Kachale
[#373448] JRuby 1.5.5 Released — Thomas E Enebo <tom.enebo@...>
The JRuby community is pleased to announce the release of JRuby 1.5.5.
On 11/10/2010 08:06 AM, Thomas E Enebo wrote:
On Wed, Nov 10, 2010 at 1:11 PM, Joel VanderWerf
On Fri, Nov 19, 2010 at 12:50 AM, Charles Oliver Nutter
[#373467] Short question about encoding. — Gabriel Lichard <poopsmith@...>
Hello everybody at the Ruby Forums!
[#373470] Does Ruby have an equivalent to Python's ctypes? — Shadowfirebird <shadowfirebird@...>
[#373479] ruby ORM — zuerrong <zuerrong@...>
Hello,
I've been writing Ruby for three days now. DataMapper seems very good.
Sam Duncan wrote in post #960638:
On Fri, Nov 12, 2010 at 5:47 PM, Mike Stephens <rubfor@recitel.net> wrote:
On Fri, Nov 12, 2010 at 9:56 PM, Petite Abeille
My problem is the mismatch.
On Sat, Nov 13, 2010 at 10:54 AM, Mike Stephens <rubfor@recitel.net> wrote:
On 11/13/2010 02:35 PM, Phillip Gawlowski wrote:
On Nov 12, 8:47=A0am, Mike Stephens <rub...@recitel.net> wrote
Skye Shaw!@#$ wrote in post #961372:
On Wed, Nov 17, 2010 at 2:34 PM, Mike Stephens <rubfor@recitel.net> wrote:
Phillip Gawlowski wrote in post #962160:
On Wed, Nov 17, 2010 at 7:24 PM, Mike Stephens <rubfor@recitel.net> wrote:
I was thinking about this last night and it's part of a belief I have
> I was thinking about this last night and it's part of a belief I have
Rimantas Liubertas wrote in post #965923:
On Fri, Dec 3, 2010 at 9:40 AM, Mike Stephens <rubfor@recitel.net> wrote:
Richard Conroy wrote in post #965936:
On Fri, Dec 3, 2010 at 10:47 AM, Mike Stephens <rubfor@recitel.net> wrote:
[#373481] what's an object? — "Eva" <eva54321@...>
SSdtIGFsc28gc3dpdGNoaW5nIGZyb20gcGVybCBhbmQgcGhwLgpJJ20gbm90IHN1cmUgaW4gcnVi
Simple answer: everything. Everything is considered an object,
> Simple answer: everything. Everything is considered an object,
Not that I know the internals of the language well enough to debate the
> Not that I know the internals of the language well enough to debate the
Fair enough. The link even cites the Ruby spec to indicate that
Did you recognize the difference between a method and a Method object?
Disclaimer: I seem to be in a crabby mood this morning. I went back over it
Hi, Josh
On Fri, Nov 12, 2010 at 3:01 AM, Xavier Noria <fxn@hashref.com> wrote:
On Fri, Nov 12, 2010 at 12:25 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Fri, Nov 12, 2010 at 12:38 PM, Xavier Noria <fxn@hashref.com> wrote:
On Fri, Nov 12, 2010 at 1:09 PM, Robert Dober <robert.dober@gmail.com> wrot=
On Fri, Nov 12, 2010 at 1:31 PM, Xavier Noria <fxn@hashref.com> wrote:
On Fri, Nov 12, 2010 at 3:56 PM, Robert Dober <robert.dober@gmail.com> wrote:
On Fri, Nov 12, 2010 at 4:18 PM, Xavier Noria <fxn@hashref.com> wrote:
On Fri, Nov 12, 2010 at 5:15 PM, Robert Dober <robert.dober@gmail.com> wrote:
On Fri, Nov 12, 2010 at 5:33 PM, Xavier Noria <fxn@hashref.com> wrote:
On Nov 10, 5:50=A0pm, Eva <eva54...@sina.com> wrote:
On Wed, Nov 10, 2010 at 10:25 PM, Y. NOBUOKA <nobuoka@r-definition.com>wrote:
On Thu, Nov 11, 2010 at 04:51:46PM +0900, Josh Cheek wrote:
On Thu, Nov 11, 2010 at 9:05 PM, Chad Perrin <code@apotheon.net> wrote:
One other point. A local variable is not an object and never is -
On Thu, Nov 11, 2010 at 9:51 AM, Brian Candler <b.candler@pobox.com> wrote:
On Thu, Nov 11, 2010 at 11:27 AM, Robert Klemme
Ammar Ali wrote in post #960710:
[#373483] Total string length regex — Shea Barton <shea@...>
So I have a complicated regex, and I need to have a condition that
[#373492] scripting an rvm command — botp <botpena@...>
Hi All,
[#373536] Parsing XML with Ruby — jackster the jackle <johnsheahan@...>
I need to hit an https link and pass a username and password in order to
It seems to be working...here is my test code:
On Fri, Nov 12, 2010 at 4:21 AM, jackster the jackle
On Fri, Nov 12, 2010 at 10:21 AM, jackster the jackle
[#373539] Scheme's (cond ((assertion) (value))...(else (value))) statement implemented in ruby? — timr <timrandg@...>
Hi Rubyists,
[#373555] Ruby scrip to find Dir based on last modified date — Bal Sidhu <balvir.sidhu@...>
Hi
[#373557] To find 2nd Sunday of March — Rajaa Ramanathan <rajaram@...>
All,
[#373573] Nokogiri not read html file in Cent OS 32-bit — Priyank Shah <shahpriyank01@...>
Hi all,
Ryan Davis wrote in post #961099:
What Ryan is telling you: you have to pass a filepointer or the actual HTML a=
[#373599] help sorting objects by their instance field — Aaron Haas <aaron4osu@...>
I'm trying to figure out how to sort objects in an array by one of their
Check the docs for class Array
Nathan Clark wrote in post #961001:
Thank you guys so much for your helpful posts. I just started learning
[#373618] Fast Debugger (Ruby 1.9.2, DevKit 4.5.0, JDK 6u22, NetBeans 6.9.1) — Allan Chin <achin5957@...>
I've been trying to run this configuration in debug mode on my Windows
And while we're at it, would you know why if I debug with the "slow"
[#373638] Hal Fulton on Twitter... — Hal Fulton <rubyhacker@...>
If you have any interest in following me, feel free.
[#373680] an each/block problem — Paul Roche <prpaulroche@...>
Hi, I want to take the value from an each method and place it in a
Just one more thing. if I want to attach the 'name' of the User to that.
[#373702] display instance variable values — John Sayeau <johnsayeau@...>
If I have a people class with instance variables @name @age and @gender
[#373712] Ruby class versioning — "Tim D." <timdeboerz@...>
Hi All
[#373717] Is it possible to break a loop from within an internal lambda function? — timr <timrandg@...>
This code works because 'exit' within the lambda within the block
[#373722] Mysql::Result .each_hash - unexpected result — Andy Tolle <durexlw.register@...>
Consider the following code:
On Sun, Nov 14, 2010 at 5:55 PM, Andy Tolle <durexlw.register@gmail.com> wr=
botp wrote in post #961345:
This is a mysql specific problem, not ruby. Result#each_hash is just
> One way of solving this would be to keep the results you want to re-use
On Mon, 2010-11-15 at 18:05 +0900, Andy Tolle wrote:
[#373723] import csv with Fields that contain double quote characters — הדסה גרינוולד <hadasagr@...>
hi
2010/11/14 =D7=94=D7=93=D7=A1=D7=94 =D7=92=D7=A8=D7=99=D7=A0=D7=95=D7=95=D7=
[#373751] Gems in ~/.gem vs in the Library — Wojtek Galaj <wojtek.galaj@...>
Hello all,
[#373773] please help load from txt — Lark Work <lars_werkman@...>
hi i new to this forum and i have a problem a made a script containing a
thanks for your help, but i got that already i don't think you quit
[#373785] Faking constants with methods — niklas | brueckenschlaeger <niklas@...>
Hi.
[#373787] Can't get Ruby programs to work from Command Prompt — Dd Dd <dd25@...>
Hello; I'm having a problem running Ruby programs through the command
[#373804] Passing a variable — flebber <flebber.crue@...>
I recently discussed in this group the basic starting of a project. I
[#373818] Stupid optparse question — Chris Patti <cpatti@...>
How can I make my code print the usage even if zero options are given?
[#373822] How to Name Gems - A STRONG Recommendation — Eric Hodel <drbrain@...7.net>
If you went to the first round of RubyConf lightning talks you saw me =
[#373839] Parsing String Data — Bob Theslob <rorcd@...>
I am very new to Ruby and I have an issue that I cannot seem to
[#373842] XMLRPC (REXML) incorrectly handles UTF-8 data — Petr Klima <petr.klima@...>
Hi,
[#373852] cool.io 0.9.0: a cool event framework for Ruby (formerly known as Rev) based on libev — Tony Arcieri <tony.arcieri@...>
Github: https://github.com/tarcieri/cool.io
Tony Arcieri <tony.arcieri@medioh.com> wrote:
On Fri, Nov 19, 2010 at 1:35 PM, Eric Wong <normalperson@yhbt.net> wrote:
On Fri, Nov 19, 2010 at 1:38 PM, Tony Arcieri <tony.arcieri@medioh.com>wrote:
Tony Arcieri <tony.arcieri@medioh.com> wrote:
On Fri, Nov 19, 2010 at 3:42 PM, Eric Wong <normalperson@yhbt.net> wrote:
Cool beans... I've been wanting to try out Cool.io (well, Rev
On Fri, Nov 19, 2010 at 3:39 PM, Bryan Richardson <btricha@gmail.com> wrote:
On Fri, Nov 19, 2010 at 5:11 PM, Tony Arcieri <tony.arcieri@medioh.com> wrote:
On Sat, Dec 4, 2010 at 6:12 PM, Charles Oliver Nutter
[#373855] File#truncate fills file with zeros — Leslie Viljoen <leslieviljoen@...>
Hello!
[#373857] Ruby 1.9.2 commandline options — Clifford Heath <no@...>
ruby --help lists -E, which doesn't seem to work as advertised,
[#373861] gets() not stopping to accept input — Rubist Rohit <passionate_programmer@...>
I am using "Programmers Notepad" to write Ruby code. I tried following
[#373863] Reporting tool — Rubist Rohit <passionate_programmer@...>
Which reporting tool I can use to integrate with a Ruby GUI app?
[#373885] Thread problem — Jaeyong Lee <crizin@...>
Hi all,
[#373918] Ruby's inconsistency or an IRB issue ? — David Unric <dunric29a@...>
Hi,
[#373930] Ruby Not observing DRY principle — flebber <flebber.crue@...>
HI I am hoping you can give me some guidance. I feel I really am
[#373932] Ruby Jobs for a beginning programmer? — Ze Ca <dartfrogger85@...>
Hi there,
Hm, the learning contract sounds interesting. I'm in the states, so I'll
[#373944] Re: Time question — "Eva" <eva54321@...>
VGhhbmtzLgpCdXQgd2h5IHRoZSBkb3QgZm9yIHRoZSBtZXRob2QgY2FsbCBjYW4gYmUgaWdub3Jl
[#373953] Calling a bash script creates files as UID 501 ? — Dreamcat Four <dreamcat4@...>
Hi,
Just also to mention that -
[#373957] SQLite3/Sinatra not returning results — Alex Gutteridge <alexg@...>
Hi,
Hi Alex,
On Thu, 25 Nov 2010 20:35:13 +0900, "zimbatm ..." <jonas@pfenniger.name>
Alex Gutteridge wrote in post #963848:
On 29.11.2010 12:39, Brian Candler wrote:
[#373974] Simple, Two-Frame Terminal Application — Bryan Richardson <btrichardson@...>
Hello All,
[#373975] Question on scoping — James Byrne <byrnejb@...>
I clearly have either forgotten something important, or I never
[#373990] Where to start from? — Ruby Me <i_baseet@...>
Hi guys,
read this: http://mitpress.mit.edu/sicp/
On Thu, Nov 18, 2010 at 2:48 PM, Ruby Me <i_baseet@hotmail.com> wrote:
[#374001] Ruby Programming — Tridib Bandopadhyay <tridib04@...>
Hello
Hello
On Fri, 19 Nov 2010 10:30:30 +0900, Tridib Bandopadhyay
Alex Gutteridge wrote in post #962544:
On Wed, 24 Nov 2010 13:02:09 +0900, Tridib Bandopadhyay
@Alex Gutteridge
On Tue, 30 Nov 2010 14:02:07 +0900, Tridib Bandopadhyay
Alex Gutteridge wrote in post #965059:
[#374007] Descending ranges in Ruby — Harry Spier <harryspier@...>
Dear list members,
[#374041] Multi-line regular expression match question — Guillermo Riojas <guillermo.riojas@...>
Hi,
On Fri, Nov 19, 2010 at 2:42 PM, Guillermo Riojas
[#374071] Install Nokogiri — Lucas Panthe <panthe@...>
Hi,
sudo apt-get install libxml2-dev
[#374081] unicorn 3.0.0 - disable rewindable input! — Eric Wong <normalperson@...>
Unicorn is an HTTP server for Rack applications designed to only serve
[#374085] contradicting unit test regarding blocks pass, bug in unit/test? — timr <timrandg@...>
require "test/unit"
[#374092] Plz anyone help me , how to write code for google login page . — Venkat s Patchava <venkatasiva_patchava@...>
Plz anyone help me , how to write code for google login page .
[#374094] Comparing XML documents — Toby Rodwell <trodwell@...>
I'd like to check the equivalence of two XML documents. Searching this
[#374099] Qt-Ruby implementation of the "Address Book Example" — Arturo Bonechi <arturo.bonechi@...>
Hello,
[#374104] gsub and backslashes — Ralph Shnelvar <ralphs@...32.com>
Consider the string
Ralph Shnelvar wrote in post #962847:
On Sun, Nov 21, 2010 at 11:02 PM, Brian Candler <b.candler@pobox.com> wrote=
On Mon, Nov 22, 2010 at 12:27 AM, Ammar Ali <ammarabuali@gmail.com> wrote:
On Mon, Nov 22, 2010 at 10:38 AM, Robert Klemme
On Mon, Nov 22, 2010 at 1:28 PM, Ammar Ali <ammarabuali@gmail.com> wrote:
On Mon, Nov 22, 2010 at 3:53 PM, Robert Klemme
On 22.11.2010 18:21, Ammar Ali wrote:
[#374114] Problem regarding regular expression — Stanford Ng <ngkooinam@...>
puts( /^[a-z 0-9]*$/ =~ 'Well hello 123' ) # no match due to ^ and
[#374127] why i can't find my ruby ? — Pen Ttt <myocean135@...>
i installed ruby this way:
when i installed ruby,
typing "irb" & pressing TAB doesn't get you anywhere?
[#374160] debugging subprocess — Chad Boyd <hoverlover@...>
I'm using Autotest to automatically run my tests when I modify my code.
[#374173] get module names — Mario Ruiz <tcblues@...>
I would like to know the module names I have declared in other file but
[#374182] help with simple game — Blake Atl <blake@...>
My boss told me to pick up a ruby book and start figuring, so he gave me
[#374193] BitStruct-28bit-Ruby Beginner — Jaikanth Krishnaswamy <jaikanth.krishnaswamy@...>
Hi ,
Jaikanth Krishnaswamy <jaikanth.krishnaswamy@gmail.com> wrote:
[#374194] Matching multiple line reg exp — Guillermo Riojas <guillermo.riojas@...>
Hi there,
[#374198] Pair Programming Interview Prep — Rub-e Shark <rakeshrnagilla@...>
Hello !
[#374210] system() or process.create? — Fengfeng Li <lifengfeng@...>
Hi everyone,
On Nov 23, 12:08=A0am, Fengfeng Li <lifengf...@huawei.com> wrote:
Luis Lavena wrote in post #963322:
On Wednesday 24 November 2010 08:03:59 Fengfeng Li wrote:
Arturo Garcia wrote in post #963497:
Del is part of cmd.exe, which is possibly why Process.create is not
[#374218] nokogiri ip ban? — "Luis G." <l17339@...>
Hi there...
[#374229] Regex negative look-behind bug? — Ruby Nuby <b1st@...>
irb, Ruby 1.9.1
On Tue, Nov 23, 2010 at 4:36 PM, Ruby Nuby <b1st@hotmail.com> wrote:
On Tue, Nov 23, 2010 at 4:36 PM, Ammar Ali <ammarabuali@gmail.com> wrote:
On Tue, Nov 23, 2010 at 5:55 PM, Robert Klemme
Ammar, Robert,
[#374232] Ruby 1.8 vs 1.9 — Peter Pincus <peter.pincus@...>
Hi,
David Masover wrote:
On Wednesday, November 24, 2010 08:40:22 pm J=F6rg W Mittag wrote:
On Fri, Nov 26, 2010 at 1:42 AM, David Masover <ninja@slaphack.com> wrote:
On Friday, November 26, 2010 05:51:38 am Phillip Gawlowski wrote:
On Sat, Nov 27, 2010 at 9:04 AM, David Masover <ninja@slaphack.com> wrote:
On Saturday, November 27, 2010 11:41:59 am Phillip Gawlowski wrote:
On Sat, Nov 27, 2010 at 7:50 PM, David Masover <ninja@slaphack.com> wrote:
On Saturday, November 27, 2010 02:47:12 pm Phillip Gawlowski wrote:
On Sun, Nov 28, 2010 at 1:56 AM, David Masover <ninja@slaphack.com> wrote:
On Sunday, November 28, 2010 08:00:18 am Phillip Gawlowski wrote:
On Sun, Nov 28, 2010 at 5:33 PM, David Masover <ninja@slaphack.com> wrote:
On Sunday, November 28, 2010 11:19:06 am Phillip Gawlowski wrote:
On Sun, Nov 28, 2010 at 9:19 PM, David Masover <ninja@slaphack.com> wrote:
On Sunday, November 28, 2010 04:29:34 pm Phillip Gawlowski wrote:
On Mon, Nov 29, 2010 at 10:38 AM, David Masover <ninja@slaphack.com> wrote:
Chuck Remes wrote in post #963430:
On Wed, Nov 24, 2010 at 8:14 PM, Brian Candler <b.candler@pobox.com> wrote:
Michael Fellinger wrote in post #963539:
On Wed, Nov 24, 2010 at 4:15 PM, Brian Candler <b.candler@pobox.com> wrote:
Phillip Gawlowski wrote in post #963602:
On Wed, Nov 24, 2010 at 5:09 PM, Brian Candler <b.candler@pobox.com> wrote:
On Wed, Nov 24, 2010 at 12:20 PM, Phillip Gawlowski <
On Wed, Nov 24, 2010 at 8:02 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
Phillip Gawlowski wrote in post #963658:
On Thu, Nov 25, 2010 at 2:05 AM, Adam Ms. <e148759@bsnow.net> wrote:
Phillip Gawlowski wrote in post #963815:
On Thu, Nov 25, 2010 at 4:02 PM, Yuri Tzara <yuri.tzara@gmail.com> wrote:
Phillip Gawlowski wrote in post #963922:
On Thu, Nov 25, 2010 at 7:43 PM, Yuri Tzara <yuri.tzara@gmail.com> wrote:
On Wed, Nov 24, 2010 at 5:09 PM, Brian Candler <b.candler@pobox.com> wrote:
On Thu, Nov 25, 2010 at 10:45 AM, Robert Klemme
On Thu, Nov 25, 2010 at 11:12 AM, Phillip Gawlowski
On Thu, Nov 25, 2010 at 12:56 PM, Robert Klemme
[#374236] Math object in Ruby — Charles Agriesti <dragriesti@...>
In IRB, or saved as a program from Scite, put in something like:
[#374246] install mechanize — Dil Bert <martin.kaspar@...24.com>
Hello dear Ruby-developers,
[#374270] Configuring LAMP for Ruby created web pages (not Rails). 2010 — "Adam Ms." <e148759@...>
Hello,
[#374279] How to write thread safe ruby code? — Raghu 2009 <raghugada@...>
Hi,
[#374299] Ruby's "More than one way to do things." — Jason Lillywhite <jason.lillywhite@...>
There is one point made about Python vs. Ruby on this site:
Shadowfirebird <shadowfirebird@gmail.com> wrote:
[#374303] Problem getting gems in linux — Leon Anonymous <leon.san.email@...>
Hi, I've been learning ruby for a few weeks now and still finding my
[#374307] Dynamically creating webpages via Ruby — "Phil H." <henleyphil@...>
I'm just getting started with Ruby and have very little programming
[#374315] date of 1 year ago — zuerrong <zuerrong@...>
Hello,
nice. never knew you could do that with the shell command date.
[#374342] instance_eval vs attr_reader — Joe Pikachu <nahpr@...>
Hi, I'm new in forum; even newer in programming.
[#374353] VERSION constant issue — Intransition <transfire@...>
Ruby's VERSION constant is getting in the way of using #const_missing
[#374379] Add XSL stylesheet using Nokogiri — Hagbard Celine <sin3141592@...>
Hi there.
http://stackoverflow.com/questions/3166544/associate-an-xml-stylesheet-with=
[#374401] Keypress event in ruby — Nikita Kuznetsov <moog_master@...>
Hi guys, im working on making a little tetris program in ruby (console
[#374411] Newbie: two cool discoveries — Diego Virasoro <diego.virasoro@...>
Hi all,
[#374416] Net::SSH.exec Using the "exec" method interactively — Guillermo Riojas <guillermo.riojas@...>
Hi there,
[#374431] relative-require v1.0 — "zimbatm ..." <jonas@...>
relative-require.rb
Why don't you use require_relative which is a standard ruby feature?
On Nov 27, 2010, at 11:34 AM, Bob Hutchison wrote:
[#374437] How to use Ruby like shell script? — Yu-Hsuan Lai <raincolee@...>
Can I use ruby like my linux shell script(e.x. bash)?(or on the other hand,
On Nov 27, 2010, at 8:51 AM, Yu-Hsuan Lai wrote:
backticks work very well as well and are in the bourne scripting
You also asked for a website resource. I feel this site is pretty venerable:
On Sun, Nov 28, 2010 at 3:47 AM, Rilindo Foster <rilindo@gmail.com> wrote:
[#374465] abstract classes and modules — Diego Virasoro <diego.virasoro@...>
Hello,
[#374477] Loading variables from a file [Noob Question] — Richard Mccormack <brick@...>
Hey everyone,
[#374492] creating a openstruct from xml — Rajinder Yadav <devguy.ca@...>
Hi just wondering if there is a easy way to turn an xml entity into a
[#374505] Multiple versions on a server? — Heinz Strunk <cojones@...>
Hey guys,
[#374523] Condition variables and thread scheduling — Alex Young <alex@...>
I'm trying to understand how condition variables are supposed to work;
[#374550] ruby on server side — Rajesh Huria <rajesh.huria@...>
Hi,
You'll want to check out one of the many Ruby web frameworks. If all you
Ok guys, thnx for the answers.. i am freaked out with all experiments :)
[#374557] Help sorting an array — Jim Burgess <jack.zelig@...>
Hi,
If you've ever read "Real Programmers don't use Pascal" (see
On Wed, Dec 1, 2010 at 8:30 PM, Mike Stephens <rubfor@recitel.net> wrote:
Ammar Ali wrote in post #965529:
On Wednesday, December 01, 2010 03:04:42 pm Mike Stephens wrote:
David Masover wrote in post #965565:.
aGVsbG8sDQppIGp1c3Qgc3RhcnRlZCB3aXRoIHJ1YnkuICBpJ3ZlIGJlZW4gb2ZmIHRoZSBmcm9u
On 12/2/2010 11:07 AM, Doug Stone wrote:
[#374560] Confusion about singleton method definition — David Unric <dunric29a@...>
Hi fellow Rubists,
[#374569] when using system(), how do I redirect Exception msgs? — "David E." <davidreynon@...>
So from my console, I execute the Ruby script via:
[#374587] RFC Future Ruby hash literal syntax — Michael Kaelbling <michael.kaelbling@...>
REQUEST FOR COMMENTS: Change to future Ruby hash literal syntax
Good Afternoon,
[#374592] class-wide begin/end blocks/exception handling — "David E." <davidreynon@...>
So I have a class with a lot of methods, and each method has a begin/end
[#374612] Any way to know a Class's name in class method? — "Eric C." <beagle4321_2000@...>
Hi:
[#374619] installing ncurses and IDE — Nikita Kuznetsov <moog_master@...>
Hi all, I was recently advised to use ncurses in order to do some event
[#374632] 'require' is not recognised — Tara Keane <tararakeane@...>
New to Ruby and trying to run benchmark
[#374661] dbi doesnt work well with sqlite3!?!? — Tianshuo Deng <dengtianshuo@...>
Hi, guys, I want to share my discovery with you. If you found I am =
[#374662] Object#each ? — Andrew Wagner <wagner.andrew@...>
A weird idea just popped into my head:
On Tue, Nov 30, 2010 at 12:44 PM, Andrew Wagner <wagner.andrew@gmail.com>wrote:
[#374664] Creating my own array sort method — "Ilya B." <ilyabe@...>
Hello,
Re: Loading variables from a file [Noob Question]
On Nov 28, 5:44=A0pm, Richard Mccormack <br...@livingwiththehorde.com>
wrote:
> Hey everyone,
> I've been working on some sort of a test-based game to learn ruby (and
> programming in general :) and I got stuck with my saving/loading system.
> To show you what I mean, this is what I used to save the game. (I want
> the code to be as modular as I can, I have some sort of an addon system
> planned...)
>
> def savegame(name, varstosave)
> =A0 savegame =3D File.new(name + ".tsl", "w")
> =A0 =A0 =A0savegame.puts varstosave.to_s
> =A0 =A0 =A0while varstosave.length !=3D 0
> =A0 =A0 =A0 =A0 savegame.puts varstosave[0]
> =A0 =A0 =A0 =A0 savegame.puts eval(varstosave[0]).to_s
> =A0 =A0 =A0 =A0 varstosave.delete_at(0)
> =A0 =A0 =A0end
> =A0 savegame.close
> end
>
> So, now I am trying to to load the variables from the file. I came up
> with the start of a function:
>
> def loadgame(name, varstoload)
> =A0 puts "Loading..."
> =A0 loadgame =3D File.open(name + ".tsl", "r")
> =A0 =A0 while varstoload.length !=3D 0
> =A0 =A0 =A0 =A0 # ?
> =A0 =A0 end
> =A0 loadgame.close
> end
>
> Where varstoload/varstosave is an array. Problem with the loading is
> that I assumed there =A0was a way to take the first variable name from th=
e
> array and actually use it as a variable. So, if the array is
> ["$intellect", "$strength"], I thought I would be able somehow to turn
> a[0] into a variable object. It seems that there isn't a way to do this,
> so I was wondering if there was a better way to manage the
> saving/loading.
> =A0- Thanks in advance! :)
>
> --
> Posted viahttp://www.ruby-forum.com/.
Not sure if it helps, but here are a few tips.
First, if you simply want to dump all the data in a file and get it
back have a look at things like the YAML library: you can take your
objects, and just with one line of code dump it into a file. (you can
alternatively use Marshal but then the file will be written in binary
format: great if you need to save space but not if you want to be able
to open the file with a text editor to have a look).
Second, and possibly more relevant. :)
A common way to do what you are trying to do would be to read a line
at a time from the file, analyse it and store the result. Here a
couple of useful functions may be:
File::read (it reads the whole file and returns a String object)
File::readlines (it reads the whole file and returns an Array of
String with one line of the file per element of the Array)
Note that in both cases these are class methods, similar to the
File.open you used.
A maybe more elegant method, and more similar to what you were trying
to do would be to use File#gets, which returns the "next" line. Then
you could modify your code so:
loadgame =3D File.open(name + ".tsl", "r")
while !loadgame.eof? # i.e. until it reaches the end of file
line =3D loadgame.gets
# more code
end
loadgame.close
Now, assuming you manage to get a line, you need to parse it to get
the data you want. The most generic way would be to use a regexp, but
for simple cases you can simply split the line into smaller Strings
via the function String#split. This would make it easier to pick the
name and the value.
So far I've assumed that you want to load all the variables in the
file. If you only want to load some, i.e. only those in the Array
varstoload you can use Array#include, for example:
loadgame =3D File.open(name + ".tsl", "r")
while !loadgame.eof? # i.e. until it reaches the end of file
line =3D loadgame.gets
elements =3D line.split
if varstoload.include? elements[0]
# add elements[0] and elements[1] to some variable/object
end
end
loadgame.close
Hope that help.
Feel free if you have other questions.
Diego