[#392923] ruby executable on ubuntu — mark kirby <markkirby80@...>
Hi
mark kirby wrote in post #1043353:
On 02/06/2012 09:59 AM, Adam Ms. wrote:
Jeremy Bopp wrote in post #1044360:
[#392950] Compile 1.9.3 on cygwin — Robert Klemme <shortcutter@...>
Hi,
[#392962] process_shared -- Python's multiprocessing for Ruby — Roger Pack <rogerpack2005@...>
Hello all.
On Wed, Feb 1, 2012 at 11:49 AM, Roger Pack <rogerpack2005@gmail.com> wrote:
[#392967] How to add javascript in a partials — "basha c." <cooolbasha@...>
Hi,
[#392979] Starting a process and specifying its parent — Victor Blaga <vic.blaga@...>
Hi,
[#392999] Reading specific columns on a text file — Cassio Godinho <cassiopgodinho@...>
Hello everyone.
[#393012] Basic Ruby performance — Dmitry Nikiforov <dniq@...>
Hello all!
Here's another example with significantly bigger performance difference:
On Fri, Feb 3, 2012 at 12:20 AM, Ryan Davis <ryand-ruby@zenspider.com>wrote:
On Thu, Feb 2, 2012 at 7:01 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
Ryan Davis wrote in post #1043813:
On 02/02/2012 08:21 PM, Dmitry Nikiforov wrote:
Ryan Davis wrote in post #1043801:
On Fri, Feb 3, 2012 at 6:20 AM, Dmitry Nikiforov <dniq@dniq-online.com> wro=
Tried rubinius and jruby. Rubinius so far is the fastest one, but still
[#393050] Choosing target network for UDP broadcast — Ivo Wever <wever@...>
If I send a UDP packet containing 'foo' like this:
[#393076] Problem migrating to Ruby 1.9.2 — Patrick Bayford <pbayford@...>
Some assistance please - I have a Ruby project, which I started in Ruby
On Fri, Feb 3, 2012 at 11:02 PM, Patrick Bayford <pbayford@talktalk.net> wrote:
[#393083] Inheritance in other notation — luk malcik <aport99@...>
Hi everybody! I've got a problem with ingeritance. If there is a
On Sat, Feb 4, 2012 at 2:14 AM, Jeremy Bopp <jeremy@bopp.net> wrote:
[#393085] 4 random numbers take highest 3 and add them together. — h4y4shi 13bladex <serpentinexcubed@...>
I want to get 4 random numbers. The numbers will be between 1-6. I want
[#393086] libv8 problem — Phil Dobbin <phildobbin@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#393096] Encoding error — Guillaume Ebuprofen <guillaume.dorchies@...>
Hello,
[#393115] Hooking a function to run in IRB context (but only in IRB context)? — Marc Heiler <shevegen@...>
Hi.
[#393124] Simple even and odd number loop in Ruby — Viera Tarcova <faithfromslovakia@...>
Hello guys, I am trying to develop a simple loop in Ruby. You need to
[#393128] inheritance one more time — luk malcik <aport99@...>
Hi, similar topic was here but still I can't do that. This is my code:
[#393131] Error with splat params in method definition — Jones Lee <joneslee85@...>
I'd like to ask why having:
[#393161] formal argument cannot be a constant — Hasmukh Patel <tohasmukh@...>
def display_method(NM)
[#393164] Using _ like in Scala? — Marc Heiler <shevegen@...>
fruits = %w( apple banana orange )
On Mon, Feb 6, 2012 at 10:54 AM, Marc Heiler <shevegen@linuxmail.org> wrote:
On Mon, Feb 6, 2012 at 7:21 PM, Tony Arcieri <tony.arcieri@gmail.com> wrote:
On Mon, Feb 6, 2012 at 5:56 PM, Eric Christopherson <
On Mon, Feb 6, 2012 at 9:07 PM, Tony Arcieri <tony.arcieri@gmail.com> wrote:
On Tue, Feb 7, 2012 at 6:56 AM, Kevin <darkintent@gmail.com> wrote:
On Tue, Feb 7, 2012 at 4:47 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
On Tue, Feb 7, 2012 at 1:00 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Tue, Feb 7, 2012 at 9:15 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
On Wed, Feb 8, 2012 at 3:43 AM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Wed, Feb 8, 2012 at 5:58 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
On Wed, Feb 8, 2012 at 4:30 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
On Wed, Feb 8, 2012 at 9:57 AM, Robert Klemme <shortcutter@googlemail.com>wrote:
On Thu, Feb 9, 2012 at 1:39 AM, Josh Cheek <josh.cheek@gmail.com> wrote:
[#393170] Make a file read-only? — Intransition <transfire@...>
Hi, I can make a file writeable easy enough,
[#393174] NOT executing if statement — Hasmukh Patel <tohasmukh@...>
#!/usr/bin/ruby
[#393181] Tork 18.0.0 — "Suraj N. Kurapati" <sunaku@...>
Tork - Test with fork - https://github.com/sunaku/tork#readme
You have faster major version release cycle than Chrome...
Am 06.02.2012 22:07, schrieb Bartosz Dziewoナгki:
Marvin G=C3=BClker wrote in post #1044440:
On Tue, Feb 7, 2012 at 02:36, Suraj Kurapati <sunaku@gmail.com> wrote:
On Tue, Feb 7, 2012 at 10:11, Ryan Davis <ryand-ruby@zenspider.com> wrote:
Whoops, sorry for the late response folks. (Although I enabled
[#393184] net-http-persistent 2.4.1 Released — Eric Hodel <drbrain@...7.net>
net-http-persistent version 2.4.1 has been released!
Just thought I'd say thanks for this awesome library.
[#393221] DCI v0.1.0 released — transfire@...
DCI 0.1.0 has been released.
[#393227] A better way? — Dave Castellano <dcastellano1@...>
Hi,
[#393231] Appending to an Array — Anthony Simonelli <asimonelli01@...>
I am querying a database using DBI and ODBC. After I run the execute, I
[#393268] A better way implement "it" the ruby way — Bravo Man <thebravoman@...>
Hi,
[#393269] Require bug confirmation: possible 'times' method error — Tom Clarke <tarclarke@...>
Hi all,
I think you're seeing expected behavior here.
Hi Randy,
[#393318] Difference between reurn and "not return" — Ralph Shnelvar <ralphs@...32.com>
Why is this syntactically value
[#393323] Introducing Schizo, A DCI gem — "Christopher J. B." <cjbottaro@...>
Schizo - DCI (data, context and interaction) for Ruby / Rails /
[#393325] While calling module, throwing error — Hasmukh Patel <tohasmukh@...>
Mymodule.rb
[#393339] RubyGems Sporadic Weirdness — Steve Johnston <steve.r.johnston@...>
I've been chasing my tail on this problem for a couple days now and its
[#393347] Symbol garbage collection — Dido Sevilla <dido.sevilla@...>
I've always wondered why Ruby didn't do garbage collection of symbols,
On Fri, Feb 10, 2012 at 8:28 AM, Dido Sevilla <dido.sevilla@gmail.com> wrote:
On Fri, Feb 10, 2012 at 11:07 AM, Robert Klemme
2012/2/10 Jes=FAs Gabriel y Gal=E1n <jgabrielygalan@gmail.com>:
On Fri, Feb 10, 2012 at 1:48 PM, Robert Klemme
Hi,
Hi,
Symbols currently have the nice property of being guaranteed (at least
[#393353] How does && work in ruby — Phil Carter <pcarter42@...>
Hi there,
[#393372] How do I save a Net::BER::BerIdentifiedString as a binary file? — Edward Stembler <ejstembler@...>
Anyone know how to save a Net::BER::BerIdentifiedString as a binary
[#393374] Return First Value that Passes — Jonah Jameson <justindallas@...>
Hello Everyone,
[#393380] @@@@@@@@@@@ Louisville vs West Virginia live free Top 25 NCAA Basketball Watch Online HD on Pc — shil shilbari <shilbari5@...>
Watch Louisville vs West Virginia live free Top 25 NCAA Basketball
On Sat, Feb 11, 2012 at 5:22 AM, shil shilbari <shilbari5@yahoo.com> wrote:
[#393394] wATCH Ortiz vs Berto live stream HBO Boxing 11 Feb 2012 — modumaloti modumaloti <modumaloti69@...>
When Victor Ortiz and Andre Berto faced off the first time the entire
[#393402] Who Administrates this list and how can the community help save this list from the noise. — andrew mcelroy <sophrinix@...>
It is very clear that this list has been under a incredibly heavy
+1
Good luck, I doubt anyone is paying attention. I have seen numerous
On Sat, Feb 11, 2012 at 1:12 PM, Cathy Alomari <cathy1428@gmail.com> wrote:
On Sat, Feb 11, 2012 at 10:48 AM, Darryl L. Pierce <mcpierce@gmail.com>wrote:
2012/2/13 Cathy Alomari <cathy1428@gmail.com>:
> Have you tried mailing ruby-talk-ctl@ruby-lang.org (mailto:ruby-talk-ctl@ruby-lang.org) with "unsubscribe"
On Mon, Feb 13, 2012 at 1:26 AM, Rimantas Liubertas <rimantas@gmail.com>wrote:
On Tue, Feb 14, 2012 at 2:19 AM, Cathy Alomari <cathy1428@gmail.com> wrote:
On Sun, Feb 12, 2012 at 10:28 AM, Ryan Davis <ryand-ruby@zenspider.com>wrote:
[#393412] the ruby syntax — maven apache <apachemaven0@...>
Hi:
When a hash is the last argument to a method, you can skip its open-
2012/2/12 Bartosz Dziewo=C5=84ski <matma.rex@gmail.com>
On Sun, Feb 12, 2012 at 10:49 PM, maven apache <apachemaven0@gmail.com> wro=
On Mon, Feb 13, 2012 at 5:19 AM, Saji Hameed <saji@u-aizu.ac.jp> wrote:
2012/2/13 Josh Cheek <josh.cheek@gmail.com>
On Mon, Feb 13, 2012 at 1:10 PM, maven apache <apachemaven0@gmail.com> wrot=
as a new syntax, i would tend to think that rubydoc (which is derived
[#393451] autotest-rails 4.1.2 Released — Ryan Davis <ryand-ruby@...>
autotest-rails version 4.1.2 has been released!
Unsubscribe
[#393465] Why GIL is not released on ruby/dl external function call. — Grigory Petrov <grigory.v.p@...>
Hello.
On Tue, Feb 14, 2012 at 2:11 PM, Grigory Petrov <grigory.v.p@gmail.com> wro=
[#393485] Any parser *for* regular expressions? — Brian Candler <b.candler@...>
Is there some existing code (preferably ruby) which can take a regular
[#393499] Factorial — Junayeed Ahnaf Nirjhor <zombiegenerator@...>
Hello,
[#393514] How to shutdown Ruby XMLRPC server? — Grigory Petrov <grigory.v.p@...>
Hello. I'm testing Ruby XMLRPC support right now. All works fine,
[#393524] darkfish rdoc sees no rdoc — Wybo Dekker <wybo@...4all.nl>
Hi, I have trouble with rdoc. I run ruby 1.9.2p290 and I installed
[#393533] 1.9.2 syntax issues — Hal Fulton <rubyhacker@...>
I admit I still use 1.8.x more often than 1.9.x -- and I keep running across
[#393535] How are closures implemented? — Ralph Shnelvar <ralphs@...32.com>
I'm one of those people who needs to see/understand a typical implementation of something before I can grok how it works.
[#393536] Metaprograming question about initialize — Ralph Shnelvar <ralphs@...32.com>
How many times have we seen this:
You can use the Struct class, which implements exactly this.
[#393546] Difference between 1.9.2 and 1.9.3 — James French <James.French@...>
module A <- line 1
On Mon, Feb 20, 2012 at 12:25, James French
That's because super with parentheses passes the same args your method
On Tue, Feb 21, 2012 at 9:40 AM, Bartosz Dziewo=C5=84ski <matma.rex@gmail.c=
DQoNCkZyb206IHBldGVyLnZhbmRlbmFiZWVsZS5iZUBnbWFpbC5jb20gW21haWx0bzpwZXRlci52
On Tue, Feb 21, 2012 at 11:44 AM, James French
DQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBSb2JlcnQgS2xlbW1lIFttYWls
[#393548] Accessing a local variable through a symbol — Ralph Shnelvar <ralphs@...32.com>
Let's say I have
On Mon, Feb 20, 2012 at 3:27 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:
Darryl,
On Mon, Feb 20, 2012 at 3:49 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:
Darryl,
[#393574] Net::IMAP::ResponseParseError — Petite Abeille <petite.abeille@...>
Hello,
[#393587] cheered to soon...... enumerable woos — Catsquotl <Catsquotl@...>
hi,
Firstly, post a complete small program which demonstrates your problem -
class Acupunt
[#393595] DNS Spoofing? — "Thomas A. Moulton" <tom@...>
Has the IP for rubyforge.org changed in the past 12-24 hours?
[#393607] minitest-excludes 1.0.1 Released — Ryan Davis <ryand-ruby@...>
minitest-excludes version 1.0.1 has been released!
[#393609] Accessing a web page and looking for a file and downloading if found — Ruby Student <ruby.student@...>
Hi Team,
Great. I'll give it a try.
[#393625] Failing to install mechanize — Ruby Student <ruby.student@...>
Hello Team,
Hi,
OK, I got rvm installed. It also looks like it installed ruby.
[#393671] Rubymoticons — Dave Aronson <rubytalk2dave@...>
I was demonstrating injection of a symbol, and noticed a familiar
On Tue, Feb 28, 2012 at 10:03 AM, Dave Aronson <
2012/2/29 Kendall Gifford <zettabyte@gmail.com>:
2012/2/29 Bartosz Dziewo=C5=84ski <matma.rex@gmail.com>:
On Wed, Feb 29, 2012 at 1:51 PM, Dave Aronson
2012/2/29 Eric Christopherson <echristopherson@gmail.com>:
2012/2/29 Bartosz Dziewo=C5=84ski <matma.rex@gmail.com>:
[#393675] Re: Script RC on Windows — Kenichi Kamiya <kachick1@...>
Hi George,
On Tue, Feb 28, 2012 at 8:58 PM, Kenichi Kamiya <kachick1@gmail.com> wrote:
Re: Help please Undefined Method error
On Fri, Feb 3, 2012 at 2:58 AM, andres d. <apolo-andres@hotmail.com> wrote:
> The program is done !!!! i was only checking it for the last time
> before going to do something else and I found the solution well the
> problem and the solution.
> the program now looks like this one
> Thank you for your help it was really usefull
>
> Attachments:
> http://www.ruby-forum.com/attachment/6949/sort_cor.rb
>
>
Hi Andes,
I took the liberty to propose an alternative to the
first block of your program. I am afraid some
aspects of your program are not really Ruby idiomatic.
This is meant as "constructive criticism", I hope you
can appreciate it. If not, sorry upfront.
<alternative>
def get_words
[].tap do |a|
while !(input = gets.chomp).empty?
a << input
end
end
end
puts "Hello, enter all the words you want, finish with empty line"
words = get_words
puts "The words you entered are:"
puts words
</alternative>
Some highlights:
* put that functionality to read the words in a separate function
and test it separately. Then you can also reuse it more easily.
* Use [].tap{|a| a<< stuff} so you do not have to return the
result array explicitly (I am not having a variable "words"
or "array" in the function, it is returned as the final result but
not stored in an explicit local variable; so I can impossibly
forget to return the built up array at the end, because "tap"
returns it automatically
* don't do "while true ... break ... end"
use "while (data is valid) ... do something with the data ... end"
the "break" in your version burns in my eyes.
* take note of the special 'while !(input = gets.chomp)' construct
with a _single_ '=' (not a double '==') in the condition for while.
Some people may find it not optimal to make an assignment,
but it is the style I prefer for that use case. I am open to alternatives
for that ...
* don't store the data that is not valid (the empty string) in the array
and then delete it afterwards. Evaluate the validity of the data
_before_ storing it in the array.
* a more advanced aspect is that inside the block of "tap", there
is no variable used that comes from the outside of the block.
That makes for safer code as there is less chance for accidental
dependency of a variable that is set higher-up in the code.
This is also the main reason for short functions, less chance for
unintended dependencies on far-away variables.
Sorry for being critical, but I honestly hope you can take the time
to analyze my comments and learn some neat "Ruby" tricks from it.
Success with Ruby and welcome :-)
Peter