[#400832] Need someone to do assessment - will pay $10! — "Mohammed A." <lists@...>
Hi,
[#400838] command prompt problem with windows 7 — Al Baker <lists@...>
I'm new to this, so forgive me noobishness(is that a word?) and have a
Am 02.11.2012 07:52, schrieb Al Baker:
> Are you really sure that the file `argv.rb' is in your current
[#400843] Simple question — "August Y." <lists@...>
I have just picked up ruby and am trying to teach my self. so this
[#400846] exception: can't convert nil into String — Peter Bailey <lists@...>
Hello,
You don't set the pdffile variable anywhere.
Bartosz Dziewo=C5=84ski wrote in post #1082535:
[#400858] Support for multiple Inheritance by classes — Ross Konsolebox <lists@...>
Will Ruby ever support multiple inheritance through classes instead of
I think I can say "no" with a fair amount of confidence.
unsubscrev please
Arlen Cuss wrote in post #1082618:
Even though other languages handle multiple inheritance without any
Peter Hickman wrote in post #1082748:
Well the example you gave at the head of this thread is pretty meaningless.
Peter Hickman wrote in post #1082753:
Ok then lets return to your puzzle problem. Given the first example that
Peter Hickman wrote in post #1082761:
On 4 November 2012 14:57, Ross Konsolebox <lists@ruby-forum.com> wrote:
> If you really want a Ruby-like language with multiple
[#400861] ruby -r debug -> "Emacs support available" — "listgj-ruby@..." <listgj-ruby@...>
Forgive my ignorance, but what does that "Emacs support available" message =
[#400862] unsubscrever forum, RETIRAR, DELETAR PLEASE, UNSUBSCREVER DO FORUM — sancozz@...
[#400865] why does UnboundMethod need to remember the class it was retrieved from (not merely owner)? — "Mean L." <lists@...>
class Base; def foo; end end
An unbound method can be called only after it is bound to an object
Igor Pirnovar wrote in post #1082653:
Mean L. wrote in post #1082655:
Igor Pirnovar wrote in post #1082666:
Mean L. wrote in post #1082678:
Igor Pirnovar wrote in post #1082685:
Mean L. wrote in post #1082686:
Igor Pirnovar wrote in post #1082688:
Mean L. wrote in post #1082704:
[#400873] image hexcode — Adriana Mikolaskova <lists@...>
Hello,
[#400912] Display Text as Image — Adriana Mikolaskova <lists@...>
Hello,
[#400914] login web page using mechanize — john smith <lists@...>
new to ruby, love the language. read programmatic programmers guide to
thank you. i am going to try your suggestion. is copybara a gem? i will
ok i need help with capybara. i keep finding pages with info about using
ive been trying to look up xpath and css selectors. i have my program
[#400946] Ruby under Valgrind shows a ton of memory errors -- normal? — Alex Dowad <lists@...>
Hi,
[#400985] How to merge two or more hashes in to one? — "Jermaine O." <lists@...>
Hi everyone.
Well, in this case I don't really see the advantage of using sets. The
Jan E. wrote in post #1083271:
Hi,
Jan E. wrote in post #1083135:
Jermaine O. wrote in post #1083143:
Jan E. wrote in post #1083144:
Jermaine O. wrote in post #1083159:
> The same thing can be achieved with Enumerable#inject, which is the
[#400994] putting values in one lines — Ferdous ara <lists@...>
Hi,
[#401006] Ruby Gem Dev IDE or editor? — Ziq Qwerty <lists@...>
I am making a ruby gem but I have to create a project structure and rake
[#401007] Type confusion: Java vs. Ruby — Regina George <lists@...>
Preface: this is my first day using Ruby
[#401026] Site down watir-webdriver — ajay paswan <lists@...>
Whenever a site is down it keeps on looking for it for sometime and
[#401027] Closing popups watir-webdriver — ajay paswan <lists@...>
Sometimes popup comes when a link is clicked, sometimes popup comes when
[#401028] open-uri, nokogiri and UTF-8 to US-ASCII — Panagiotis Atmatzidis <atma@...>
Hello,
If one were to examine the ruby URI docs, how would one know that there
[#401046] Need help improving this FileUtils.cp of an array of destinations — Robert Hansen <lists@...>
Hi
[#401079] Ruby script to process html — Mario Trento <lists@...>
Hi,
Or maybe you have a hint how to extract value between <td>...</td>,
[#401098] RSpec question about catching expected exception in class .new — tamouse mailing lists <tamouse.lists@...>
I have the following I'm trying to test:
[#401123] Heroku question — Kasenath Nao <lists@...>
Is Heroku for uploading my pure ruby(not rails) application and letting
[#401125] Complete newbie — "Carlos A." <lists@...>
Hey guys!
Your mac already comes with a computer programming text editor--it's
On Sat, Nov 10, 2012 at 3:32 PM, 7stud -- <lists@ruby-forum.com> wrote:
True. Why not try Gedit or maybe sublime text 2? Just a suggestion.
[#401141] Instance name of a class/object? — Carolyn Grant <lists@...>
Hi! I'm quite new to Ruby, and am quite confused about instance names.
[#401143] Trouble with http post — "Shaun A." <lists@...>
I am trying to create an http post request that sends a series of
[#401161] Convert date to string — Ferdous ara <lists@...>
Hi
Subject: Convert date to string
> You will have a Time object (do ri Time to know more), on which you
Am 11.11.2012 19:57, schrieb Ferdous ara:
On Mon, Nov 12, 2012 at 6:23 AM, <sto.mar@web.de> wrote:
Am 12.11.2012 15:45, schrieb Hassan Schroeder:
[#401173] question on watir — Raj pal <lists@...>
I am automating Idit application using Ruby, at one screen I can't feed
[#401191] Extending Array instances — Charles Hixson <charleshixsn@...>
I'm trying to figure out a good way to extend an Array, when the items
Charles Hixson wrote in post #1084111:
Brian Candler wrote:
On Mon, Nov 12, 2012 at 10:12 PM, Charles Hixson
[#401200] Efficient way for comparing records between 2 large files (16 million records) — Ruby Student <ruby.student@...>
Team,
Hello,
Robert,
[#401203] Python or RUBY? — "Radu M." <lists@...>
Hi.What do you think is easier?
[#401211] Calling Ruby from C (reverse SWIG) — Graham Menhennitt <graham@...>
TXkgQyBwcm9ncmFtIGNhbGxzIGEgdGhpcmQtcGFydHkgV2luZG93cyBETEwgdG8gcHJvdmlkZSBh
[#401245] Beginner with project in mind — Dan Dan <lists@...>
Hi, I've recently started learning ruby and have a project in mind.
[#401264] Need of ruby and Scripting language — NagaLakshmi _N <lists@...>
Hi..
We don't have to use a scripting language, but if you're a Ruby beginner, it sounds like you might have chosen to anyway!
[#401270] best method for creating a new gem in 1.9.3 land — tamouse mailing lists <tamouse.lists@...>
I'm starting to work on a new gem, a command line application.
[#401274] following along with "Beginning Ruby." — Al Baker <lists@...>
I'm having trouble following along with some of the examples in this
I tried to delete a directory that I created.
I did. I got:
[#401279] Question on exceptions — Justin Gamble <lists@...>
Hello! I have a simple bank program where I have to have an exception
What is the reason of doing the .new(...)in
Justin Gamble wrote in post #1084635:
On Fri, Nov 16, 2012 at 1:43 AM, Brian Candler <lists@ruby-forum.com> wrote:
On Fri, Nov 16, 2012 at 9:27 AM, tamouse mailing lists
On Fri, Nov 16, 2012 at 6:27 AM, Robert Klemme
[#401282] Re: creating users with LDAP — "Marcelo G." <lists@...>
You are certainly not obligated to answer any postings but I was
[#401297] why texts are jumbled using PDF-reader. — ajay paswan <lists@...>
I am using pdf-reader gem and trying to look for some content at some
[#401301] Alternatives to methods for large number of nested "ifs" — Philip Rhoades <phil@...>
People,
Philip Rhoades wrote in post #1084734:
[#401336] Advice for simple client/server application — Panagiotis Atmatzidis <atma@...>
Hello,
Subject: Advice for simple client/server application
[#401340] Cannot install heroku gem — Kunio Takamoto <lists@...>
Hi,
[#401344] adding load_path — Jia Hu <hujia06@...>
Hi all:
[#401364] Metaprogramming — "Aurimas N." <lists@...>
Hello,
Aurimas N. wrote in post #1085124:
7stud, you are being needlessly belligerent. A moment's Googling would tell you that Aurimas is not a native English speaker, and you should adjust your attitude accordingly.
[#401366] Magical 57.6 minutes in Time — Todd Benson <caduceass@...>
irb(main):80:0> RUBY_VERSION
[#401371] Missing Something — "Ron S." <lists@...>
I am an amateur programmer, and I feel I am missing something. Whenever
Thanks, Chris! I have spent time thinking about ALL of those things.
On Mon, Nov 19, 2012 at 5:27 PM, Ron S. <lists@ruby-forum.com> wrote:
[#401380] some gems not working anymore — johnny mo <lists@...>
hi,
[#401402] C Extension Shutdown GC vs Free Functions Called — Robert Buck <lists@...>
It was my assumption that during shutdown the objects would be freed
Robert Buck wrote in post #1085583:
Unsure if this really applies. Could you restate? I am not quite
[#401404] "undefined method `synchronize' for #<Mutex:0xa0f5adc>" from embedded Ruby program — Graham Menhennitt <graham@...>
I'm writing a C++ program (on Centos 5 Linux) that embeds a Ruby 1.9.3
On 21/11/2012 5:38 PM, Graham Menhennitt wrote:
Ah: prelude.rb defines Mutex#synchronize and Thread.exclusive in Ruby.
On 22/11/2012 1:09 PM, Arlen Cuss wrote:
[#401422] how to increase variable inside the while loop — Ferdous ara <lists@...>
Hi, my question might be confusing as its hard for me to make it clear,
[#401430] mysql drama! — Al Baker <lists@...>
I'm havng trouble using mysql in my example.
[#401433] Call SharePoint web services in Ruby — Baba Ghaytadkar <lists@...>
Hello Team,
On Wed, Nov 21, 2012 at 9:58 PM, Baba Ghaytadkar <lists@ruby-forum.com> wrote:
[#401434] Instance-variable-like user API — Garthy D <garthy_lmkltybr@...>
[#401438] ruby 1.9.3p237 in cygwin — botp <botpena@...>
definitely not a ruby-core dev here, so hope this is ok to post.
On 22/11/2012 19:16, botp wrote:
[#401449] CSV:mode must be 'r', 'rb', 'w', or 'wb' — ajay paswan <lists@...>
Why this code is giving error:
[#401450] Errno::ECONNREFUSED in net/ssh — Sambath Kumar Moorthy <lists@...>
Hi,
[#401451] Arrays with records as objects — Steve Tucknott <lists@...>
I am completely new to Ruby.
[#401452] Optimal number of threads in real browser testing — ajay paswan <lists@...>
Am writing a program for multithread real browser testing using ruby
[#401458] working with mysql in ruby — john smith <lists@...>
i have been trying to successfully connect ruby with mysql. there are a
I just tried reinstalling ruby, i installed the devkit. i do have vmware
На 25.11.2012 г. 20:39 ч., john smith написа:
Ivan Cenov wrote in post #1086301:
> You can put the lib\libmysql.dll available in this package to your
[#401481] declarative database schemes - automatically create migration files? — Marc Weber <marco-oweber@...>
I'm looking for something like this:
[#401490] Ruby XMLRPC OpenSSL::SSL::SSLError — Mohammed Yasin Rahman <Mohammed-Yasin.Rahman@...6.fr>
Hi,
On Fri, Nov 23, 2012 at 7:00 AM, Mohammed Yasin Rahman
On Fri, Nov 23, 2012 at 7:26 AM, Mohammed Yasin Rahman
I am using ruby 1.9.3p194 (2012-04-20 revision 35410) =
On Fri, Nov 23, 2012 at 7:50 AM, Mohammed Yasin Rahman
[#401516] I'm exploiting Ruby references — Nokan Emiro <uzleepito@...>
Hi,
On Sat, Nov 24, 2012 at 2:39 AM, Nokan Emiro <uzleepito@gmail.com> wrote:
[#401520] C Extension: Why would VALUE state appear differently during shutdown than immediately before it? — Robert Buck <lists@...>
I have a graph of objects in a C extension, and as such I maintain
For the record, if anyone else tries to write a database driver, or any
[#401529] How to create a gem which conditionally compiles/installs a C extension? — "Rocky B." <lists@...>
I have a gem that needs to compile and install a C extension on MRI
> * Figure out some way in the gem to dynamically disable compiling the
[#401565] browser.html diffrent from the page source - watir-webdriver — ajay paswan <lists@...>
Hi,
[#401567] click on link not working with ie #watir-webdriver — ajay paswan <lists@...>
Greetings,
Found this on another forum, does it help?
[#401577] Few unclosed browser — ajay paswan <lists@...>
I have the following program using watir-webdriver, I have made the code
[#401578] atomic statements in multithreading — ajay paswan <lists@...>
suppose I am working in multiple thread each thread runs following
On Mon, Nov 26, 2012 at 12:03 PM, ajay paswan <lists@ruby-forum.com> wrote:
Robert Klemme wrote in post #1086457:
[#401581] Own sort method — "Artem B." <lists@...>
I have wrote my own sort method for array:
[#401597] Contribuer à Diaspora — Flaburgan <flaburgan@...>
[#401598] Algorithm for choosing object based on priority — Damjan Rems <lists@...>
Since I am not computer graduate (electro engineer as mater of fact) I
On Mon, Nov 26, 2012 at 3:23 PM, Damjan Rems <lists@ruby-forum.com> wrote:
Thanks so much. I guess I was over-complicating.
On Mon, Nov 26, 2012 at 6:10 PM, Damjan Rems <lists@ruby-forum.com> wrote:
On Mon, Nov 26, 2012 at 6:30 PM, Jes=FAs Gabriel y Gal=E1n
[#401607] Novice: Understanding instance 'variables' and methods — Steve Tucknott <lists@...>
A question - or comment - on instance variables.
[#401616] Ruby + Selenium-webdriver — "Mattias A." <lists@...>
Hi,
[#401635] error in if — Mohammed Yasin Rahman <Mohammed-Yasin.Rahman@...6.fr>
WHat's the error here?
[#401644] Getting the smallest Items of an Array — "Ismail M." <lists@...>
Hello guys,
>> def n_min(l,n) (1..n).map {a=l.min ; l=l-[a]; a } end
2012/11/29 Regis d'Aubarede <lists@ruby-forum.com>:
On Thu, Nov 29, 2012 at 12:02 PM, Regis d'Aubarede <lists@ruby-forum.com> wrote:
[#401655] gem problems(sigh) — Al Baker <lists@...>
i tried to make a gem and tried to build the spec file and this is what
[#401672] Using model methods without an object for that model — comopasta Gr <lists@...>
Hi, I'm implementing an API to create records for one type of object in
Ha, I think this one was better on the ruby on rails space of the forum.
[#401674] CGI question — Assaf Shomer <lists@...>
Ruby Beginner question.
[#401676] How to know in which class we are when inheriting — Mario Ruiz <lists@...>
Look at this code:
Hi,
Well, it is more complicated what i want to do... but doint it like you
On Wed, Nov 28, 2012 at 12:51 PM, Mario Ruiz <lists@ruby-forum.com> wrote:
Hey Robert it doesn't work for me that way, i'm using 1.8.7 and i cannot
[#401687] Multidimensional Array — "John M." <lists@...>
Hi ,
[#401688] sorting data from a file — "Ismail M." <lists@...>
Hey guys,
of course I see your point Jan E.
I haven't done any thing yet.. i just didn't know where to start.
[#401706] Newbie question: (free) on-line courses? — Ken D'Ambrosio <ken@...>
Hello, all. There's a bunch of free on-line training for Javascript,
Codecademy just added Ruby.
Some basic lessons at www.oldkingjames.org click link top of page to lesson=
[#401711] Page Objectt design with Selenium Watir-Webdriver — "Mattias A." <lists@...>
Hi,
[#401724] This is not working. — "Radu M." <lists@...>
Hi...I tried this code:
[#401730] Need advice- would like to implement a delayed-load proxy class — Gary Weaver <lists@...>
I'd like to have const_missing return a class that would do the
[#401733] Simple script not working — Prog Rammer <lists@...>
Hi,
It looks like your browser can't establish a connection. Firewall?
[#401740] Trouble with Chronic — Joel Pearson <lists@...>
I've decided to try Chronic to make it easier (hopefully) to get certain
[#401753] removing directories — Peter Bailey <lists@...>
Hello,
[#401770] An example in Exception Handling with Ruby. — "Nathan Mr." <lists@...>
Source file is attached. I'm new to this forum so I don't know if there
[#401772] Ordered Hash (v. 1.8) — Doug Jolley <lists@...>
I am running Ruby v. 1.8.7 and I have installed the orderedhash gem. I
[#401791] Ocra build error — Joel Pearson <lists@...>
I'm confused by this, I can't see any reason for Ocra to fail in
[#401807] Gem install error? — Al Baker <lists@...>
i tried to install my own gem and got this:
Re: Extending Array instances
Brian Candler wrote:
> Charles Hixson wrote in post #1084133:
>> Hashes are slow compared to direct indexing.
> Says who?
This is a commonly true statement for a wide variety of languages. I am
quite likely to be translating this work into another language. In the
other language I am certain that it is a true statement. Unless Array
access is significantly slower than Hash access (which I cannot believe)
this is the way to proceed.
>
>> Push might be a good
>> answer, but not if it allocates storage item by item.
> It doesn't. Look at the MRI C implementation if you really care: the
> underlying array storage size is increased in chunks. Ditto for Strings.
That's ok. push was the wrong answer anyway. The right answer was that
Arrays automatically extend to encompass the largest index that you use
to store into them.
>
> void
> rb_ary_store(ary, idx, val)
> ...
> if (idx>= RARRAY(ary)->aux.capa) {
> long new_capa = RARRAY(ary)->aux.capa / 2;
>
> if (new_capa< ARY_DEFAULT_SIZE) {
> new_capa = ARY_DEFAULT_SIZE;
> }
> if (new_capa>= ARY_MAX_SIZE - idx) {
> new_capa = (ARY_MAX_SIZE - idx) / 2;
> }
> new_capa += idx;
> REALLOC_N(RARRAY(ary)->ptr, VALUE, new_capa);
> RARRAY(ary)->aux.capa = new_capa;
> }
>
> [from ruby-1.8.7-p352/array.c]
Sorry, my C isn't that good, and there are a lot of undefined terms in
that snippet. I can't really say I understand it. I can usually guess
what's going on, but undefined macros make me quite unsure...and I try
to avoid pointers when writing code, because I want to understand it
later. For that matter, I usually avoid macros, too. I realize that
this is a common C coding style, but it's one reason I dislike C. I'd
prefer D, FORTRAN, or even Ada or Eiffel. (Yaa...the code is what it
is. But to me what it is is confusing.)
>
>> Allocation of memory is another expensive operation
> Says who? Expensive compared to all the other things going on in your
> program? Your program will probably be creating objects
> left-right-and-centre, and having them garbage collected too.
Among system calls, allocation of memory is one of the more expensive.
OTOH, the comment earlier about Array automatically extending itself
answers this as there are
steps automatically taken to minimize the number of allocations of
memory. I don't think that using push repeatedly is a good idea (and in
any case, it doesn't fit with my logic, unless there is something about
the system that demands that it be done that way, which there isn't).
>
> I think you are approaching this the wrong way. I suggest you first
> write some code that works, using the most simple and logical code.
> *Then* optimise it if required: and optimise by measuring. Even for
> experienced programmers, usually the hot-spot turns out not to be where
> they guess it might be. And as you have already implied, you might need
> to optimise for memory usage over speed.
If I design the basic framework of the application around a poor design,
I'll have to rewrite the entire thing. This is something to get right
at the start. It's not a premature optimization. There are lots of
places where I'm taking to "do enough and patch it later" approach. The
reason this isn't one, is because this needs to be handled now.
>
> > From a speed point of view, I'm pretty confident in saying that the
> implementation of Hash (in C) versus the implementation of Array (in C)
> is unlikely to be the bottleneck in your program. An Array may use less
> memory than a Hash - but since the Array or Hash holds only object
> references (essentially pointers), both may be small compared to the
> memory allocated to the objects you are holding within them.
>
OK. If it's not the bottleneck, that will be very good. Is there ANY
reason that Hash is a better choice? I don't believe that there is, but
I could be wrong. Certainly if they are the same speed, and use about
the same amount of memory, I would prefer to use an Array. My
expectation is that Array will be faster as well as using significantly
less RAM, but were they the same, I would still prefer to use an Array,
as it will match more nearly the preferred order of I/O (among other
reasons). It is true that my reasons for preferring an Array are all
minor, and if Array has some real drawback, then I would readily switch
to Hash. But I haven't heard of one. I had some questions about how to
use it, but those have, I believe, been answered.
P.S.: I understand that if I use a Hash, item will be retrieved in the
order entered when I iterate through them. This isn't my desired
result. I want to retrieve them in index # order. I'd rather not have
to sort them.
P.P.S: A part of my design is driven by my desire to have a language
independent form of serialization...and YAML won't work for my
purposes. I may decide to have an isomorphic realization of this in a
binary serialization that isn't language independent, but that WOULD be
premature optimization.