First  |  Prev |  Next  |  Last
Pages: 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
array and hash combine methods
glen wrote: Just thought I'd post a solution I came up with to finding combinations (as in, permutations and combinations) of arrays. For example, combining: [1,2] and [3,4,5] should return: [[1,3],[1,4],[1,5],[2,3],[2,4],[2,5]] which is easy enough. But I wanted something that comb... 8 Jun 2010 09:08
Installing Tk
Hello ruby forums, Cutting straight to the case, I just recently bought a new mac computer, and I am having trouble getting ruby to work with Tk. I had extraneous trouble getting Tk to work on my old computer, but my new one seems to have no version of Tk on it at all. Whereas before I had some version of Tk in... 9 Jun 2010 04:15
[ANN] strace_me 1.0 Released
http://seattlerb.rubyforge.org/strace_me A wrapper around strace(1) that allows you to perform targetted tracing of a block. strace_me allows you to track down problems without wading through gobs of ruby startup or other irrelevant noise. ... 7 Jun 2010 19:57
Defining struct in a class
How can I properly define a struct in a class? If I have class Cards Card = Struct.new(:suit, :number) @cardsOnHand=[] @cardsOnHand.push(Card.new("S","5")) end This will give me an error message saying the push is not defined for NilClass. How should I fix this? -- Posted via http://www.r... 9 Jun 2010 13:04
keep eventmachine app running
I want to find out how to get a event machine app running in the background. In example scripts I have seen when the script are executed it runs in the console but when the window/ssh session is closed the app stops. What needs to be done to have the scripts running as a process in the background -- Posted ... 7 Jun 2010 19:57
opengl problem (from gears sample)
I wanted to take a look at ruby's opengl but I'm having issues -- can you help me out? I installed it and I can require it in irb or a file without issue: irb 001:0> require 'opengl' true 002:0> include Gl, Glu, Glut Object I downloaded the opengl gears demo here: http://members.shaw.ca/michael.brooks/ge... 7 Jun 2010 18:49
[ANN] JRuby 1.5.1 Released
The JRuby community is pleased to announce the release of JRuby 1.5.1. * Homepage: http://www.jruby.org/ * Download: http://www.jruby.org/download JRuby 1.5.0 was a long overdue and huge release. JRuby 1.5.1 is a minor follow-up release to address some of the more visible issues discovered after the re... 7 Jun 2010 17:42
questions of idiom
Hello List I am relatively new to ruby. I have set myself the problem of writing a lexical analyzer in ruby to learn some of it's capabilites. I have pasted the code for that class and for the calling test harness below. I beg the lists indulgence in several ways 1) has this problem already been solved in a... 8 Jun 2010 04:44
Complex numbers contradiction?
This looks correct: Complex(1,1)**-1 => Complex(Rational(1, 2), Rational(-1, 2)) But this does not; should be same answer: 1/Complex(1,1) => Complex(0, -1) A similar try gives same (wrong) answer: Complex(1,0) / Complex(1,1) => Complex(0, -1) What am I missing? Thanks! Andrew -- Posted via... 8 Jun 2010 04:44
Question about abbreviated indexing assignments
Hi! According to the specification, primary_expression[indexing_argument_list] ω= expression is (roughly) evaluated like o = primary_expression *l = indexing_argument_list v = o.[](*l) w = expression (v ω w).tap {|x| l << x o.[]=(*l) } In particular, this means that the assignment *a... 7 Jun 2010 16:35
First  |  Prev |  Next  |  Last
Pages: 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87