[#405207] Does `self` and `scope(local)` operate parallels? — "Kumar R." <lists@...>

I am heavily confused with the topic when thinking `self` and `local

21 messages 2013/03/01
[#405211] Re: Does `self` and `scope(local)` operate parallels? — "Kumar R." <lists@...> 2013/03/01

Just to help experts out there I am clearing my statement once again

[#405242] Confusion in instance method calls of super class from subclass — "Kumar R." <lists@...>

I was just playing to see the instance method calls from the subclass

16 messages 2013/03/02
[#405252] Re: Confusion in instance method calls of super class from subclass — Hans Mackowiak <lists@...> 2013/03/03

YOU DID NOT READ WHAT I WAS WRITTEN:

[#405250] Extending Ruby. Little help or guidance if you are willing! — Cliff Rosson <cliff.rosson@...>

Hi Folk,

21 messages 2013/03/03
[#405393] Re: Extending Ruby. Little help or guidance if you are willing! — nannasin smith <lists@...> 2013/03/06

I've tried to do some reading but some of this is a bit over my head.

[#405549] Re: Extending Ruby. Little help or guidance if you are willing! — Cliff Rosson <cliff.rosson@...> 2013/03/10

Haven't been able to touch this in a week but I had a few minutes to look

[#405550] Re: Extending Ruby. Little help or guidance if you are willing! — Bartosz Dziewoński <matma.rex@...> 2013/03/10

On Sun, 10 Mar 2013 04:41:32 +0100, Cliff Rosson <cliff.rosson@gmail.com> wrote:

[#405600] Re: Extending Ruby. Little help or guidance if you are willing! — Cliff Rosson <cliff.rosson@...> 2013/03/11

Got ya. So it doesn't really matter if I convert things to ID and compare

[#405271] Confusion with Ruby's "case/when" block statement — "Kumar R." <lists@...>

Ruby uses `===` operator on the `case/when` type execution style.Now It

13 messages 2013/03/03

[#405310] How `next` works in ruby with `unless` ? — "Kumar R." <lists@...>

The `next` statement is used to skip a part of the loop and continue

25 messages 2013/03/04
[#405311] Re: How `next` works in ruby with `unless` ? — Joel Pearson <lists@...> 2013/03/04

Learn what semicolons do in Ruby.

[#405312] Re: How `next` works in ruby with `unless` ? — Matthew Kerwin <matthew@...> 2013/03/04

What Joel said.

[#405313] Re: How `next` works in ruby with `unless` ? — "Kumar R." <lists@...> 2013/03/04

Matthew Kerwin wrote in post #1100097:

[#405323] YourLanguageSucks — Kiswono Prayogo <kiswono@...>

Hi, i found this link.. https://wiki.theory.org/YourLanguageSucks

10 messages 2013/03/05

[#405376] When can one call themselves a “Rubyist”? — Rafal Chmiel <lists@...>

I was wondering what that term even meant. Is it something to do with

10 messages 2013/03/05

[#405400] Bignum-Fixnum-Numeric confusion — Pritam Dey <lists@...>

Hi,

13 messages 2013/03/06

[#405444] Question regarding automating some Outlook/IMAP and pdf parsing functions w/ ruby? — Ed Zimmerman <lists@...>

Hello,

20 messages 2013/03/07

[#405477] Compiling Ruby 2.0, problem with OpenSSL — "Piotr P." <lists@...>

Trying to compile Ruby 2.0 from source, having problem with it, getting

10 messages 2013/03/07

[#405495] RubyExcel class. Useful? — Joel Pearson <lists@...>

I've managed to create a (relatively) stable data-processing class which

32 messages 2013/03/08

[#405570] Confusion with block local variable declaration with block variable declaration within the pipe `|` — Love U Ruby <lists@...>

Why are we not allowed to create local variables or new object with

17 messages 2013/03/11

[#405597] Confusion with empty block printing — Love U Ruby <lists@...>

When I typed the below in my IRB:

18 messages 2013/03/11

[#405608] Access values for JSON.parse response — Nicole Villette <lists@...>

Hello, Does anyone know who to get the values from a nested hash in

17 messages 2013/03/11

[#405630] Confusion with some Module methods. — Love U Ruby <lists@...>

Can anyone help me to understand how the below module methods works?

16 messages 2013/03/12

[#405656] Confusion with Strings — Love U Ruby <lists@...>

From the book I read a line about string :

18 messages 2013/03/12

[#405762] Understanding Ruby Classes, Objects and Methods. — Kedar Mhaswade <lists@...>

Dear Rubyists,

12 messages 2013/03/13

[#405931] Finding one's way with 'super' in define_method/alias_emthod — Marcin Rzeźnicki <marcin.rzeznicki@...>

Hi all!

12 messages 2013/03/18
[#405935] Re: Finding one's way with 'super' in define_method/alias_emthod — Robert Klemme <shortcutter@...> 2013/03/18

On Mon, Mar 18, 2013 at 5:50 PM, Marcin Rze=C5=BAnicki

[#405936] Re: Finding one's way with 'super' in define_method/alias_emthod — "Marcin R." <lists@...> 2013/03/18

Robert Klemme wrote in post #1102151:

[#405942] Re: Finding one's way with 'super' in define_method/alias_emthod — Robert Klemme <shortcutter@...> 2013/03/18

On Mon, Mar 18, 2013 at 8:39 PM, Marcin R. <lists@ruby-forum.com> wrote:

[#405986] Ruby tainting on primitives — "Nicolas V." <lists@...>

Hi there,

18 messages 2013/03/20

[#405987] Why was the object_id for true and nil changed in ruby2.0? — Bharadwaj Srigiriraju <lists@...>

irb(main):001:0> true.object_id

11 messages 2013/03/20

[#406015] fixedpnt 0.0.1: Binary Fixed Point Calculations — Axel Friedrich <lists@...>

https://github.com/Axel2/fixedpnt.rb

12 messages 2013/03/20

[#406184] Nokogiri help parsing HTML — Paul Mena <lists@...>

I'm relatively new to Ruby (and therefore Nokogiri) and am trying to

18 messages 2013/03/26

[#406258] Translation Project — Jeremy Henderson <lists@...>

Hello all! This is my first post! I started learning Ruby about 3 weeks

22 messages 2013/03/28

[#406291] Hash with default — Harry Kakueki <list.push@...>

I would like to make a hash like h2 with the default described by h in one

12 messages 2013/03/29

[#406375] Ruby Gotchas presentation slides — Dave Aronson <rubytalk2dave@...>

I recently made available the slides for a presentation I did

13 messages 2013/03/30

[#406387] Private setters can be called by self, why not getters? — Josh Cheek <josh.cheek@...>

class Counter

9 messages 2013/03/31

Re: IO buffering problem

From: Garthy D <garthy_lmkltybr@...>
Date: 2013-03-16 01:56:12 UTC
List: ruby-talk #405852
Hi Andrew,

No problem at all. :) I hope to have the opportunity to be utterly 
annihilated by your completed program in chess some day. ;)

Cheers,
Garth

On 16/03/13 12:03, Andrew Wagner wrote:
> Yep, I think you're dead-on right. Thanks again.
>
>
> On Fri, Mar 15, 2013 at 8:23 PM, Garthy D
> <garthy_lmkltybr@entropicsoftware.com
> <mailto:garthy_lmkltybr@entropicsoftware.com>> wrote:
>
>
>     Hi Andrew,
>
>     Happy to be able to help, even if only indirectly. :)
>
>     Also check out "trap" ("Signal.trap") if you can usefully catch and
>     use those SIGINTs. Perhaps they're tied to certain commands like
>     "force" in the protocol in case you need to stop "thinking" on a
>     move? That's a wild guess based on a two-minute reading of the
>     protocol though.
>
>     Cheers,
>     Garth
>
>
>     On 16/03/13 11:46, Andrew Wagner wrote:
>
>         Ha, I fixed it. You were almost right, Garthy, the UI was
>         seemingly-randomly sending me SIGINTs. I had to tell it in the
>         protocol
>         initializer not to do that. Very odd.
>
>
>         On Fri, Mar 15, 2013 at 8:09 PM, Andrew Wagner
>         <wagner.andrew@gmail.com <mailto:wagner.andrew@gmail.com>
>         <mailto:wagner.andrew@gmail.__com
>         <mailto:wagner.andrew@gmail.com>>> wrote:
>
>              Thanks for the response. I really don't have to handle every
>              incoming response. I put in the line you suggested, and it did
>              indeed identify a number of commands that are "unknown".
>         But that's
>              ok, as far as I can tell.
>
>              As for "if" vs. "case", in my real program, I did something
>         even
>              more general:
>         https://github.com/arwagner/__tdchess/blob/master/lib/__tdchess/runner.rb
>         <https://github.com/arwagner/tdchess/blob/master/lib/tdchess/runner.rb>
>         .
>              This lets you plug in any command handlers you want. I plan on
>              having a library of handlers for different commands, maybe
>         a nice
>              DSL or something for creating new ones, etc. Obviously, I
>         shortened
>              all of that to isolate this problem.
>
>
>              On Fri, Mar 15, 2013 at 7:57 PM, Garthy D
>         <garthy_lmkltybr@__entropicsoftware.com
>         <mailto:garthy_lmkltybr@entropicsoftware.com>
>         <mailto:garthy_lmkltybr@__entropicsoftware.com
>         <mailto:garthy_lmkltybr@entropicsoftware.com>>> wrote:
>
>                  Hi Andrew,
>
>
>                  On 16/03/13 09:04, Andrew Wagner wrote:
>
>                      All,
>                      I'm writing a chess program that has a simple
>         text-based
>                      interface. It's
>                      designed to be run by another program, which has a
>         nice UI.
>                      Here's the
>                      program as it stands now, whittled to the simplest
>         possible
>                      use case:
>
>                      i = 0
>                      moves = ["a7a6","a6a5","a5a4","a4a3"]
>                      $stdin.each do |command|
>                          if command.start_with?("protover"____)
>
>                            $stdout.puts "feature ping=0 setboard=1 ics=1
>         usermove=1"
>                          elsif command.start_with?("usermove"____)
>
>                            $stdout.puts "move #{moves[i]}"
>                            i+=1
>                          end
>                          $stdout.flush
>                      end
>
>                      The "protover" thing is needed to tell the UI
>         program how to
>                      initialize
>                      the protocol, and then every time a move is made,
>         the UI
>                      program sends
>         "usermove <some move>" to my program, which responds with
>         "move <my move>".
>
>                      If I run this by itself, I can happily enter a few
>         'usermove' commands
>                      manually, and get any number of canned moves back.
>         However,
>                      when I run
>                      this under the UI, I get an Interrupt:
>
>                      bin/winboard.rb:3:in `each': Interrupt
>                      from bin/winboard.rb:3:in `<main>'
>
>                      I know that the UI program is pretty reliable, so I'm
>                      missing something
>                      in the way that I'm handling IO buffering or
>         something. If
>                      you want the
>                      nitty gritty details, you can see them at
>         http://www.gnu.org/software/____xboard/engine-intf.html
>         <http://www.gnu.org/software/__xboard/engine-intf.html>
>
>         <http://www.gnu.org/software/__xboard/engine-intf.html
>         <http://www.gnu.org/software/xboard/engine-intf.html>> . I'm
>                      running on
>                      MacOSX. Any suggestions?
>
>
>                  Is it possible that you aren't processing one of the
>         commands
>                  from the program, and the program is terminating your
>         script,
>                  perhaps after a timeout or incorrect response? I'm
>         wondering
>                  what would show up if you added this:
>
>                  else
>                     $stderr.print "Unknown command: '#{command}'\n"
>
>                  just before the second-last line. Are you handling every
>                  incoming command as it expects?
>
>                  Incidentally, you could always turn those if statements
>         into
>                  case/when, something like:
>
>                  case command
>                  when /^protover/
>                  ...
>                  when /^usermove/
>                  ...
>                  else
>                     $stderr.print "Unknown command: '#{command}'\n"
>                  end
>
>                  This might make it easier if there are a lot of
>         commands you
>                  need to respond to.
>
>                  Cheers,
>                  Garth
>
>
>
>
>
>


In This Thread