[#385051] How to order Structs based on two fields — Iñaki Baz Castillo <ibc@...>
Hi, I've a struct like this:
2011/7/1 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
On Fri, Jul 1, 2011 at 12:55 PM, I=F1aki Baz Castillo <ibc@aliax.net> wrote=
>
2011/7/1 Gunther Diemant <g.diemant@gmx.net>:
[#385069] Offering Help — Joe Peric <peric.joe@...>
I'm new to Ruby and I am willing to learn. Anyone need help on a
On Fri, Jul 1, 2011 at 11:43 AM, Joe Peric <peric.joe@gmail.com> wrote:
Never heard of it, but I'll get right on it. Thanks.
Just finished this. I had to find some more info on exceptions to get
On Sat, Jul 2, 2011 at 1:39 PM, Joe Peric <peric.joe@gmail.com> wrote:
A tutorial site here.
Hi,
On Sun, Jul 3, 2011 at 9:57 AM, Y. NOBUOKA <nobuoka@r-definition.com> wrote:
[#385074] Ruby Kickstart - free course with videos, quizzes, & challenges — Josh Cheek <josh.cheek@...>
WEBSITE:
[#385075] ruby 1.8.7 patchlevel 352 released — Urabe Shyouhei <shyouhei@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#385076] Ruby C API:How to prevent a VALUE being collected by the garbage collecter? — ZaCk <ladacez@...>
Ruby C API:How to prevent a VALUE being collected by the garbage collecter?
-----BEGIN PGP SIGNED MESSAGE-----
On 07/02/2011 11:35 AM, Kim Burgestrand wrote:
[#385086] Renages — Peter Hicks <peter.hicks@...>
All,
[#385097] Are blocks objects? What messages can they handle? — Chad Perrin <code@...>
Stop me if I'm making any unwarranted assumptions here:
A block is a syntactical construct, not an object. A Proc is the
John,
On Mon, Jul 04, 2011 at 12:15:54AM +0900, Stephen Boesch wrote:
On Sun, Jul 3, 2011 at 12:26 PM, Chad Perrin <code@apotheon.net> wrote:
[#385102] symbol vs string for hash keys — Intransition <transfire@...>
What are the important factors to consider when deciding whether to
On Mon, Jul 04, 2011 at 12:28:03AM +0900, Intransition wrote:
[#385130] Define a constant in dynamically defined class — Intransition <transfire@...>
Have me a conundrum.
[#385144] NoBacksies v0.3.0 released — transfire@...
NoBacksies 0.3.0 has been released.
[#385153] Dir.glob and File.fnmatch don't seeing eye to eye — Intransition <transfire@...>
What does File.fnmatch? not support {p,q} style selectors?
[#385157] LOCat v0.1.0 released — transfire@...
LOCat 0.1.0 has been released.
[#385160] Fatal Error with Ruby/GTK2, Homebrew, Green Shoes, and OSX Snow Leopard — Timothy Barnes <barnes7td@...>
I posted the below question to the Shoes mailing list and got back the
Hi,
I can't find that directory at all. is it ~/opt/local/......? much less the
Hi,
Here are the instructions that I followed (from green shoes github site):
kou,
[#385184] Lemon v0.8.4 released — transfire@...
Lemon 0.8.4 has been released.
[#385192] summaryse 1.1.0 Released — Bernard Lambeau <blambeau@...>
summaryse version 1.1.0 has been released!
[#385194] RubyInstaller Extras — Jon <jon.forums@...>
Since 2009, we've been pleased to include Huw Collingbourne's The Book of Ruby with RubyInstaller. Well now, Huw has a newly updated version, and he's published it with No Starch Press.
...looks interesting...i'm just finishing up on a long Haskell journey...so,
[#385197] alf 0.9.1 Released — Bernard Lambeau <blambeau@...>
Hi all!
Bernard Lambeau wrote in post #1010469:
On Wed, Jul 13, 2011 at 10:46 PM, Intransition <transfire@gmail.com> wrote:
I was not aware of this difference between RRV and SemVer before;
[#385204] Passing a ruby arrays to JS func — ruby rails <rubyonrails4me@...>
How do I pass the ruby arrays to Js func and access it(from JS func)from
[#385207] Creating a range of directories — Simon Harrison <simon@...>
I'm wanting to create a range of directories with a prefix, like the
Thanks a lot. I didn't realise that FileUtils.mkdir accepted a format
[#385234] ruby 1.9 mac install problems — Marshall Farrier <info@...>
Following Dave Thomas' instructions in Programming Ruby 1.9, p. 7, I got
Ryan Davis wrote in post #1010623:
[#385247] Why return(XXX) is valid within a "value = case N ..." ? — Iñaki Baz Castillo <ibc@...>
Hi, the following code does not "compile":
On Thu, Jul 14, 2011 at 10:56 AM, I=F1aki Baz Castillo <ibc@aliax.net> wrot=
[#385271] does OrderedHash exist? — Alexey Muranov <muranov@...>
Hello,
[#385276] Is there a more efficient way to remove data from a string? — Eddie Catflap <catflaporama@...>
Hi
On Fri, Jul 15, 2011 at 09:37:14AM +0900, Eddie Catflap wrote:
On Fri, Jul 15, 2011 at 09:54:48AM +0900, Chad Perrin wrote:
[#385281] Problem with Ruby on OS X — Abhishek Chanda <rony358@...>
Hi,
[#385292] Look — Intransition <transfire@...>
I have tried for over a year to contact Michel Martens concerning the
On Thu, Jul 14, 2011 at 9:23 PM, Intransition <transfire@gmail.com> wrote:
[#385297] Help needed for a new release of text-hyphen — Austin Ziegler <halostatue@...>
I've had folks asking me for a release of text-hyphen that works with
On Jul 15, 2011, at 12:45 AM, Austin Ziegler wrote:
> Running with the debugger on for 1.8.7 brings up this discrepancy:
On Fri, Jul 15, 2011 at 8:18 AM, Kaspar Schiess <eule@space.ch> wrote:
On Fri, Jul 15, 2011 at 9:06 AM, Austin Ziegler <halostatue@gmail.com> wrot=
[#385306] Not receiving some mail from ruby-talk — Josh Cheek <josh.cheek@...>
Hi, it seems that some of the posts to ruby-talk aren't making it to my
http://www.ruby-forum.com/topic/1978201#new
[#385307] Elegant selection of closest number? — Philip Rhoades <phil@...>
People,
[#385311] replace string between xml tags that contains special characters — Rousan Malik <rousanmalik@...>
I am trying to get rid of the string in a xml file which contains some
[#385326] Comparing hashes based on their keys — Stefano Mioli <stefano.mioli@...>
Hi list,
On Fri, Jul 15, 2011 at 5:38 PM, Stefano Mioli <stefano.mioli@gmail.com> wr=
[#385342] moving a 1.8.6 install? — Roggie Boone <rogboone@...>
Is it possible to move the gems from a Ruby 1.8.6 install on an (old)
On Fri, Jul 15, 2011 at 12:27 PM, Roggie Boone <rogboone@yahoo.com> wrote:
On Fri, Jul 15, 2011 at 2:52 PM, Hassan Schroeder <
On Fri, Jul 15, 2011 at 1:36 PM, Josh Cheek <josh.cheek@gmail.com> wrote:
[#385382] Ignore Segmentation fault? — Paul Bergstrom <pal@...>
When I run a cron, using whenever gem, the script is executed but I get
[#385389] duplicated when clause is ignored — Marc Heiler <shevegen@...>
I recieve quite some errors like this.
On 7/16/11 11:50 PM, Marc Heiler wrote:
[#385395] Array#each vs. Array#each_index iteration — jake kaiden <jakekaiden@...>
hey folks,
i was indeed missing something obvious - thanks for pointing it out!
On Sun, Jul 17, 2011 at 5:03 PM, jake kaiden <jakekaiden@yahoo.com> wrote:
[#385410] Better name for #zip_with — Intransition <transfire@...>
Any ideas for a better name for:
How about #zip_and_map? Notice that:
Thomas Sawyer wrote in post #1011313:
[#385432] Ruby output formater — raju sathliya <raju.sathliya@...>
Hello,
On Mon, Jul 18, 2011 at 7:52 AM, raju sathliya <raju.sathliya@gmail.com>wrote:
[#385439] Is this a float-bug or naive comprehension? — ZipiZap zap <zipizap123@...>
Hello all,
[#385442] What is BasicObject (really)? — Jim Maher <jdmaher@...>
In a recent thread titled "Unexpected results from private_methods", I
[#385449] Another year, another Ruby Conf, another round with the begging bowl — Eleanor McHugh <eleanor@...>
A touch of deja vu here: UK-based full-time open source developer =
[#385452] Ruby + USB + CCTV Camera Driver? — "Bob Carpenter." <rgc3679@...>
I want to write a Ruby driver that handles the feed from A CCTV camera.
On 2011-07-18 1:00 PM, Bob Carpenter. wrote:
William Rutiser wrote in post #1011466:
On Mon, Jul 18, 2011 at 11:51 AM, Bob Carpenter. <rgc3679@yahoo.com> wrote:
Hassan Schroeder wrote in post #1011472:
On Mon, Jul 18, 2011 at 12:58 PM, Bob Carpenter. <rgc3679@yahoo.com> wrote:
On Tue, Jul 19, 2011 at 12:18 AM, Hassan Schroeder
Phillip Gawlowski wrote in post #1011503:
On Tue, Jul 19, 2011 at 2:20 AM, Bob Carpenter. <rgc3679@yahoo.com> wrote:
Phillip Gawlowski wrote in post #1011518:
On Tue, Jul 19, 2011 at 4:39 PM, Bob Carpenter. <rgc3679@yahoo.com> wrote:
Phillip Gawlowski wrote in post #1011653:
On Wed, Jul 20, 2011 at 6:25 AM, Bob Carpenter. <rgc3679@yahoo.com> wrote:
[#385465] Ruby Readline - and why ruby can learn from python — Marc Heiler <shevegen@...>
Lately I wanted to have <TAB> completion work for some of my scripts
[#385485] forcing all http requests to follow system proxy configuration — eunikorn imazinator <gp.eunikorn@...>
I am working with a ruby application that uses some loosely coupled
[...]
[#385492] Get common entries in two arrays — Iñaki Baz Castillo <ibc@...>
Hi, is there a way to generate a new array with the common elements in
2011/7/19 I=C3=B1aki Baz Castillo <ibc@aliax.net>:
[#385501] How to change date format from Y/m/d to Y-m-d — Annie smith <annie.smith.vufind@...>
Hi All,
[#385509] A beginner question. — "Cajus A." <cajus_@...>
Hi i'm trying to write and example program where you speak to a
Sorry i uploaded the wrong file. Heres the right one.
[#385528] Code works in IRB but not when saved and run (NET/TOC) — Opviel Krevt <ovashena@...>
I'm using the net-toc gem to connect to AIM with Ruby 1.8.7 since 1.9.2
[#385542] Splitting strings — Ryan Mckenzie <ryan@...>
Hi all,
You're right. I'm still a beginner to Ruby, however I have still tried
Ok, so far at the minute then I have included the counter hash so I have
[#385556] File copy from Client to Server via web-services — Rails Crazy Idiot <mail2sanand@...>
Hi,
[#385565] error building ruby p290 — Dev Guy <devguy.ca@...>
I get the following build error on my Linux box while trying to build
On Jul 20, 2011, at 8:29 AM, Dev Guy wrote:
On Wed, Jul 20, 2011 at 9:08 PM, Eric Hodel <drbrain@segment7.net> wrote:
[#385595] array max value — CC Chen <dickyhide@...>
When I set an array k = [3,5,6,0,1,4,5,6,9,1]
[#385611] How to replace "\" from string. — Gaurang Shah <shahgomji@...>
Hi all,
[#385612] How to find the character in string — Gaurang Shah <shahgomji@...>
I have a string where i need to find out if particular character is
[#385615] Building a tree from the leaves down — Intransition <transfire@...>
Have a algorithmic problem, I can't quite get a clear idea of how to
[#385626] Issue downloading an image from a URL (HTTP request) — Hunter Mcmillen <mcmillhj@...>
I am trying to download the image of a chart I created using the
[#385629] Are Job Ads OK? — Lee Hughes <lee@...>
Is it OK to post Ruby job ads on this forum?
On Fri, Jul 22, 2011 at 04:45:11AM +0900, Lee Hughes wrote:
[#385639] attr_accessor for hash keys — Chad Perrin <code@...>
Is there a way to use attr_accessor, or something like it (without
[#385650] create object by reflection — leandro doe <leandro.rhcp99@...>
My doubt is how create objects by reflection, when they need more than
[#385676] builder lib-a-like? — Intransition <transfire@...>
Wasn't there already a lib like this?
[#385680] regex oddity — Roger Pack <rogerpack2005@...>
Anybody know why this occurs?
[#385683] open localhost url — Smp Mp <sharnelp@...>
Hi,
On Fri, Jul 22, 2011 at 11:59 AM, Smp Mp <sharnelp@gmail.com> wrote:
[#385688] What's up with "Dir.glob"? — Peter Bailey <pbailey@...>
Hi,
[#385719] Top level function definition gets in Kernel module? — Jean-Pascal Billaud <jp.billaud@...>
irb(main):001:0> def test_fun
[#385730] best style for setting items in a collection — Marshall Farrier <info@...>
I've only recently started learning Ruby and notice in Thomas'
[#385737] Exclusive operator in ruby — "amir e." <aef1370@...>
Hi
[#385740] Run something on last test case — Mario Ruiz <tcblues@...>
I need to run some code always on the last testcase that is run in any
[#385741] why doesn't return ascii code? — "amir e." <aef1370@...>
hi
[#385750] Help with Regex — Gregory Ma <g.marcilhacy@...>
Hi,
[#385771] Please give simple example of when to use symbols — Kaye Ng <sbstn26@...>
I'm still a bit confused on whether to use strings or symbols in certain
[#385777] Very Very simple problem — "amir e." <aef1370@...>
Hi
[#385795] Issue installing a gem from local disk. zlib error message received — Ruby Student <ruby.student@...>
Hello all,
[#385810] Why aren't string literals treated similarly to symbols? — Jeremy Bopp <jeremy@...>
Explaining the difference between symbols and strings got me wondering
Hi,
Jeremy Bopp wrote in post #1013041:
[#385814] Ruby to C transpiler — Intransition <transfire@...>
Are there any?
[#385831] How do I pass a variable to the Chroinc library function? — Terry Improv_coder <tpensel@...>
require 'chronic'
[#385833] Difference between Ruby Versions — Data Flow <dataoverflow@...>
Can you tell me please what's the difference between ruby versions..
[#385837] read excel file — CC Chen <dickyhide@...>
How to read the excel file(.xls)
[#385847] String manuplation example — kotin 76 <kotin76@...>
Hi,
You have static value '/dev/sda4'? then you can do the following
Hi Hans Mackowiak and Shah,
On Wed, Jul 27, 2011 at 7:54 AM, kotin 76 <kotin76@yahoo.com> wrote:
[#385860] Counting lines of code in a ruby code file ignoring method code lines in the process — Harry Truax <htruax@...>
Hello,
Well this could be a bit of a cheat but you could put the code through
Thanks for the reply Peter. Yeah, I thought about something like that, but
[#385866] if condition for pattern matching — kotin 76 <kotin76@...>
Hi All,
you need "" or '' around your string
Hi all,
hi ,
Hi ,
[#385881] I Need some help installing ruby — Data Flow <dataoverflow@...>
I need some help people.. i hope i don't ask too much.
[#385884] How do we read this line of code? — SW Engineer <abder.rahman.ali@...>
If we have the following line of Ruby code:
[#385902] siimple string manuplation logic. But i did not getting correct one — kotin 76 <kotin76@...>
Hi All,
[#385908] Location of SSL certificates on Windows (7) — Damjan Rems <d_rems@...>
I am trying to access Exchange server with viewpoint gem. Connection is
[#385928] long loops inside threads — Miguel Angel Nieto <correo@...>
Hi,
[#385929] OptionParser on option separator "--" — Bernard Lambeau <blambeau@...>
Hi all!
[#385936] Help in Pointer — Tridib Bandopadhyay <tridib04@...>
Hello
Is this what your looking for:
[#385944] No tests were specified errror — Gaurang Shah <shahgomji@...>
Hi all,
[#385947] class variables in modules, annoying — Iñaki Baz Castillo <ibc@...>
Hi, let me show the following code:
"I=C3=B1aki Baz Castillo" <ibc@aliax.net> wrote in post #1013702:
2011/7/29 7stud -- <bbxx789_05ss@yahoo.com>:
[#385961] Unite test is not woking as per design — Gaurang Shah <shahgomji@...>
require 'test/unit'
What do you get when you run this program:
7stud -- wrote in post #1013742:
This is what I see in my mail from 7stud
Josh Cheek wrote in post #1013761:
On Fri, Jul 29, 2011 at 8:05 PM, 7stud -- <bbxx789_05ss@yahoo.com> wrote:
[#385982] avoiding capturing local variables in closures — Chuck Remes <cremes.devlist@...>
I do a lot of event-driven programming (Eventmachine, ZMQMachine). You would think that by now I would know how to answer this question but I'm a bit stumped.
<snip>
Robert Dober wrote in post #1013853:
[#386010] Documentation in Ruby — "amir e." <aef1370@...>
Hi
[#386012] Ruby a "4th generation language"? Credible sources? — Albert Schlef <albertschlef@...>
I've noticed that Wikipedia says that "C#, Java" are 3'rd generation
The Wikipedia articles are spurious.
On Mon, Aug 01, 2011 at 04:24:43PM +0900, Mike Stephens wrote:
> I've noticed that Wikipedia says that "C#, Java" are 3'rd generation
[#386013] NoMethodError: undefined method — Gaurang Shah <shahgomji@...>
I am not able to understand why it gets nil object. would someone let me
[#386016] Installing Ruby — Felipe Velasquez <velasquez.felipe@...>
Hy guys! :)
[#386024] Ruby 1.9.3 preview1 released — "Yuki Sonoda (Yugui)" <yugui@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#386030] How to connect to and use Postgresql from Ruby — Rannug Pong <ruby@...>
Hello everyone.
On Mon, Aug 01, 2011 at 03:30:25AM +0900, Chris White wrote:
[#386033] send() docs are wrong — 7stud -- <bbxx789_05ss@...>
obj.send(symbol [, args...]) =E2=86=92 obj
[#386050] system stack error in ObjectSpace.each_object — luke gruber <luke.gru@...>
Hey guys, I'm just starting to mess around with metaprogramming in Ruby,
On Sun, Jul 31, 2011 at 4:29 PM, luke gruber <luke.gru@gmail.com> wrote:
> Typically, SystemStackError is due to recursing for too long, perhaps I
On Mon, Aug 1, 2011 at 3:56 AM, luke gruber <luke.gru@gmail.com> wrote:
> I assume you created some weird kind of recursion via
luke gruber wrote in post #1014312:
>Something like:
On Wed, Aug 3, 2011 at 3:54 AM, luke gruber <luke.gru@gmail.com> wrote:
[#386053] newbie question — Marc Chanliau <marc.chanliau@...>
This snippet works fine:
Chris White wrote in post #1014080:
On Mon, Aug 1, 2011 at 8:33 PM, Marc Chanliau <marc.chanliau@gmail.com>wrote:
best style for setting items in a collection
I've only recently started learning Ruby and notice in Thomas'
Programming Ruby 1.9 that it seems to be stylistically preferable (and
presumably also faster fwiw) not to use a for loop but rather to use the
each method as often as possible. But I'm having trouble using combining
that with re-assigning values inside an array.
More specifically, consider the following problem: We have an array of
integers and want the result to be the same as the following for loop:
for i in 1...arr.length
arr[i] += arr[i - 1]
end
Is it stylistically better to use the for loop here or do something like
this:
1.upto(arr.length - 1) {|i| arr[i] += arr[i - 1]}
Or is there another way of doing it that is better than both of these? I
feel like I should be able to do this using the each method but can't
figure out how to make the assignment work that way, and the upto
version is pretty short and sweet.
--
Posted via http://www.ruby-forum.com/.