[#306796] Hash#select returns an array but Hash#reject returns a hash... — "Srijayanth Sridhar" <srijayanth@...>

Hello,

21 messages 2008/07/01
[#306820] Re: Hash#select returns an array but Hash#reject returns a hash... — Dave Bass <davebass@...> 2008/07/01

Srijayanth Sridhar wrote:

[#306822] Re: Hash#select returns an array but Hash#reject returns a hash... — "Srijayanth Sridhar" <srijayanth@...> 2008/07/01

irb(main):001:0> a=Hash.new

[#306825] Re: Hash#select returns an array but Hash#reject returns a hash... — Pe, Botp <botp@...> 2008/07/01

From: Srijayanth Sridhar [mailto:srijayanth@gmail.com]=20

[#306835] Re: Hash#select returns an array but Hash#reject returns a hash... — "Srijayanth Sridhar" <srijayanth@...> 2008/07/01

>

[#306838] Re: Hash#select returns an array but Hash#reject returns a hash... — "David A. Black" <dblack@...> 2008/07/01

Hi --

[#306849] Re: Hash#select returns an array but Hash#reject returns a hash... — "Rick DeNatale" <rick.denatale@...> 2008/07/01

On Tue, Jul 1, 2008 at 8:48 AM, David A. Black <dblack@rubypal.com> wrote:

[#306809] Dynamic Variables — Marc Heiler <shevegen@...>

Is there any way in ruby to create dynamic variables?

13 messages 2008/07/01

[#306908] threadify-0.0.1 — ara howard <ara.t.howard@...>

19 messages 2008/07/01

[#306924] workarounds for ruby 1.8.6 segmentations faults — liquid_rails <cheri.anaclerio@...>

Hi,

12 messages 2008/07/01

[#307014] Ranges and Enumerable problems — "Glen Holcomb" <damnbigman@...>

Okay so when I play with "!".."~" wrong things happen.

24 messages 2008/07/02
[#307018] Re: Ranges and Enumerable problems — "Robert Klemme" <shortcutter@...> 2008/07/02

2008/7/2 Glen Holcomb <damnbigman@gmail.com>:

[#307021] Re: Ranges and Enumerable problems — "Glen Holcomb" <damnbigman@...> 2008/07/02

On Wed, Jul 2, 2008 at 9:12 AM, Robert Klemme <shortcutter@googlemail.com>

[#307030] Re: Ranges and Enumerable problems — "Adam Shelly" <adam.shelly@...> 2008/07/02

On 7/2/08, Glen Holcomb <damnbigman@gmail.com> wrote:

[#307035] Re: Ranges and Enumerable problems — "Robert Dober" <robert.dober@...> 2008/07/02

On Wed, Jul 2, 2008 at 7:13 PM, Adam Shelly <adam.shelly@gmail.com> wrote:

[#307037] Re: Ranges and Enumerable problems — "Adam Shelly" <adam.shelly@...> 2008/07/02

On 7/2/08, Robert Dober <robert.dober@gmail.com> wrote:

[#307042] Re: Ranges and Enumerable problems — Robert Klemme <shortcutter@...> 2008/07/02

On 02.07.2008 19:48, Adam Shelly wrote:

[#307050] Re: Ranges and Enumerable problems — "Rick DeNatale" <rick.denatale@...> 2008/07/02

On Wed, Jul 2, 2008 at 2:27 PM, Robert Klemme <shortcutter@googlemail.com>

[#307053] Re: Ranges and Enumerable problems — "Todd Benson" <caduceass@...> 2008/07/02

On Wed, Jul 2, 2008 at 3:50 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#307070] Install/Enable openssl for ruby 1.8.6? — Jason Bornhoft <jbornhoft@...>

I was trying to install Redmine on rails 2.0.2 (this is not a rails

12 messages 2008/07/03

[#307080] thoughts on a more generic Array#partition function — "Rudi Cilibrasi" <cilibrar@...>

An experiment in a more generic partition function. The current

16 messages 2008/07/03
[#307083] Re: thoughts on a more generic Array#partition function — Pe, Botp <botp@...> 2008/07/03

From: Rudi Cilibrasi [mailto:cilibrar@gmail.com]=20

[#307088] Re: thoughts on a more generic Array#partition function — "Rudi Cilibrasi" <cilibrar@...> 2008/07/03

Hi Botp,

[#307095] Re: thoughts on a more generic Array#partition function — Pe, Botp <botp@...> 2008/07/03

From: Rudi Cilibrasi [mailto:cilibrar@gmail.com]=20

[#307136] Re: thoughts on a more generic Array#partition function — "Rick DeNatale" <rick.denatale@...> 2008/07/03

On Thu, Jul 3, 2008 at 12:53 AM, Pe=F1a, Botp <botp@delmonte-phil.com> wrot=

[#307101] Slide Show (S9) Gem Now Includes S5 Support (Including Built-In Gradient Themes) — "Gerald Bauer" <geraldbauer2007@...>

Hello,

21 messages 2008/07/03

[#307153] pseudo-randomize an array in a consistent order — Max Williams <toastkid.williams@...>

Does anyone know how to pseudo-randomize an array (eg with a seed) so

24 messages 2008/07/03

[#307246] Getting Folder Size — Clement Ow <clement.ow@...>

When I use File.size("C:/ruby"), all it returns is 0.

15 messages 2008/07/04

[#307284] from ruby/RoR to Java (framework unknown) :( — S2 <x@...>

My company today decided to ditch ruby development and to develop new web

35 messages 2008/07/04

[#307302] Does Ruby have any advantage over Python to create semantic applications? — Costan <CMValma@...>

Hi all,

10 messages 2008/07/04

[#307414] implementing a simple and efficient index system — Janus Bor <janus@...>

Hello everyone,

18 messages 2008/07/06
[#307415] Re: implementing a simple and efficient index system — phlip <phlip2005@...> 2008/07/06

Janus Bor wrote:

[#307585] Threads: Different behavior under Linux and Windows — Armin Armbruster <aarmbruster@...>

Hi,

13 messages 2008/07/08

[#307654] How to delete a file in Win XP — MAwiniarski <MAwiniarski@...>

Greetings,

18 messages 2008/07/09

[#307667] Thread-safe priority queue? — "Sean O'Halpin" <sean.ohalpin@...>

Hi,

13 messages 2008/07/09

[#307804] Why Ruby interpreter is writed in c (not in c++)? — "Ranieri Teixeira" <ranieri.tx@...>

Hi,

27 messages 2008/07/11
[#307807] Re: Why Ruby interpreter is writed in c (not in c++)? — phlip <phlip2005@...> 2008/07/11

Ranieri Teixeira wrote:

[#307853] Symbolify (#169) — "Matthew Moss" <matthew.moss@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

78 messages 2008/07/11
[#307863] Re: [QUIZ] Symbolify (#169) — "ara.t.howard" <ara.t.howard@...> 2008/07/11

[#307870] Re: [QUIZ] Symbolify (#169) — "Alex LeDonne" <aledonne.listmail@...> 2008/07/11

On Fri, Jul 11, 2008 at 12:12 PM, ara.t.howard <ara.t.howard@gmail.com> wrote:

[#307874] Re: [QUIZ] Symbolify (#169) — "ara.t.howard" <ara.t.howard@...> 2008/07/11

[#307879] Re: [QUIZ] Symbolify (#169) — Dana Merrick <dmerrick@...> 2008/07/11

ara.t.howard wrote:

[#307882] Re: [QUIZ] Symbolify (#169) — "ara.t.howard" <ara.t.howard@...> 2008/07/11

[#307883] Re: [QUIZ] Symbolify (#169) — James Gray <james@...> 2008/07/11

On Jul 11, 2008, at 12:16 PM, ara.t.howard wrote:

[#307933] can ruby replace bash scripts for linux script — "Greg Hauptmann" <greg.hauptmann.ruby@...>

hi,

14 messages 2008/07/12

[#307962] Can't install gems after a new ubuntu install — Max Williams <toastkid.williams@...>

Sorry if this is the wrong forum...

15 messages 2008/07/12

[#307973] regular expressions help — Vivek <krishna.vivek@...>

Hi,

17 messages 2008/07/12

[#308154] Text Editor — Jacob Grover <jacob.grover@...>

Hello, I've been wondering for a long time if there's an Internet text

14 messages 2008/07/14

[#308240] Is it possible to dynamically extend Test::Unit test cases? — "David Mitchell" <monch1962@...>

Hello list,

10 messages 2008/07/15

[#308264] Array.drop doesn't work — Li Chen <chen_li3@...>

Hi all,

14 messages 2008/07/15
[#308265] Re: Array.drop doesn't work — Frederick Cheung <frederick.cheung@...> 2008/07/15

[#308370] The next number that is not in an array — Tim Conner <crofty_james@...>

I want to increment the current value of a variable to the next number

28 messages 2008/07/16
[#308381] Re: The next number that is not in an array — "David A. Black" <dblack@...> 2008/07/16

Hi --

[#308409] So who's coming to RubyFringe? — Oliver Saunders <oliver.saunders@...>

...I am! Hope you meet some of you guys over here.

11 messages 2008/07/17

[#308509] Records and Arrays (#170) — "Matthew Moss" <matthew.moss@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

13 messages 2008/07/18

[#308525] Multiple GEM repositories — Rob Mauchel <rmauchel@...>

I have a Ruby script which runs fine on my own machine that I'd like to

14 messages 2008/07/18

[#308642] Does "rescue" wihtour argument handle any kind of Exception or not? — Iñaki Baz Castillo <ibc@...>

Hi, I read in this article:

17 messages 2008/07/20
[#308643] Re: Does "rescue" wihtour argument handle any kind of Exception or not? — Stefano Crocco <stefano.crocco@...> 2008/07/20

On Sunday 20 July 2008, I=C3=B1aki Baz Castillo wrote:

[#308645] Re: Does "rescue" wihtour argument handle any kind of Exception or not? — Phlip <phlip2005@...> 2008/07/20

Stefano Crocco wrote:

[#308698] rdoc 2.1.0 Released — Eric Hodel <drbrain@...7.net>

rdoc version 2.1.0 has been released!

25 messages 2008/07/21
[#308723] Re: [ANN] rdoc 2.1.0 Released — Joel VanderWerf <vjoel@...> 2008/07/21

Eric Hodel wrote:

[#308750] Re: [ANN] rdoc 2.1.0 Released — Marcin Raczkowski <mailing.mr@...> 2008/07/21

I started playing with new release and frameless template doesn't work.

[#308759] Re: [ANN] rdoc 2.1.0 Released — Eric Hodel <drbrain@...7.net> 2008/07/22

On Jul 21, 2008, at 14:05 PM, Marcin Raczkowski wrote:

[#308790] Re: [ANN] rdoc 2.1.0 Released — Marcin Raczkowski <mailing.mr@...> 2008/07/22

Eric Hodel wrote:

[#308853] Re: [ANN] rdoc 2.1.0 Released — Eric Hodel <drbrain@...7.net> 2008/07/22

[#308699] protected members or explicit abstract classes? — aidy <aidy.lewis@...>

Hi,

12 messages 2008/07/21

[#308736] read CSV file using csv library — Li Chen <chen_li3@...>

Hi all,

19 messages 2008/07/21
[#308774] Re: read CSV file using csv library — "kranthi reddy" <kranthicu@...> 2008/07/22

Hey you can use faster csv instead using the standard csv ruby library.

[#308817] Re: read CSV file using csv library — Li Chen <chen_li3@...> 2008/07/22

kranthi reddy wrote:

[#308821] Re: read CSV file using csv library — "kranthi reddy" <kranthicu@...> 2008/07/22

Hi,

[#347910] Re: read CSV file using csv library — Frank Guerino <frank.guerino@...> 2009/10/07

kranthi reddy wrote:

[#347914] Re: read CSV file using csv library — Marvin Gülker <sutniuq@...> 2009/10/07

Frank Guerino wrote:

[#308761] bj and rails 2.1 - can't get bj to run jobs — dusty <dusty.doris@...>

I have been trying to setup bj with rails 2.1.0 and am having some

13 messages 2008/07/22

[#308831] simple module for "count my instances" behaviour — Julien Thewys <jt@...>

I want to make a simple module that makes its including classes

11 messages 2008/07/22

[#308847] how to capitalize a number of characters in a word — Cheyne Li <happy.go.lucky.clr@...>

Hi, there

13 messages 2008/07/22

[#308884] Is there a simple way to find a method definition? — Ruby Freak <twscannell@...>

Hi,

12 messages 2008/07/23

[#308909] circular 'require' — Shadowfirebird <shadowfirebird@...>

Hi,

29 messages 2008/07/23
[#308911] Re: circular 'require' — Stefano Crocco <stefano.crocco@...> 2008/07/23

On Wednesday 23 July 2008, Shadowfirebird wrote:

[#308919] Re: circular 'require' — Calamitas <calamitates@...> 2008/07/23

On Wed, Jul 23, 2008 at 12:18 PM, Stefano Crocco

[#308935] Re: circular 'require' — "Michael T. Richter" <ttmrichter@...> 2008/07/23

On Wed, 2008-07-23 at 20:39 +0900, Calamitas wrote:

[#308940] Re: circular 'require' — Shadowfirebird <shadowfirebird@...> 2008/07/23

I found a very easy way around it. This is what bothers me. If it's

[#308943] Re: circular 'require' — "Michael T. Richter" <ttmrichter@...> 2008/07/23

On Wed, 2008-07-23 at 22:48 +0900, Shadowfirebird wrote:

[#308944] Re: circular 'require' — Shadowfirebird <shadowfirebird@...> 2008/07/23

Yes, I can see now that in your example no order of loading will allow

[#308951] Of GUIs threads and scheduling woes — "Glen Holcomb" <damnbigman@...>

I have a small GUI app that I have written the purposes for it's creation

12 messages 2008/07/23

[#309006] differnce between .nil? , .empty?, .blank? — Sijo Kg <sijo@...>

Hi

11 messages 2008/07/24

[#309074] Simultaneously URL call, is it possible? — Toki Toki <toki84@...>

Hi to all!

22 messages 2008/07/24
[#309080] Re: Simultaneously URL call, is it possible? — matu <m@...> 2008/07/24

Toki Toki wrote:

[#309083] Re: Simultaneously URL call, is it possible? — Toki Toki <toki84@...> 2008/07/24

matu wrote:

[#309089] inline comments in future release? — Mike Schwab <mike.schwab@...>

Are inline comments a potential feature of Ruby 2.0?

25 messages 2008/07/24
[#309101] Re: inline comments in future release? — Tim Hunter <TimHunter@...> 2008/07/24

Mike Schwab wrote:

[#309111] Re: inline comments in future release? — Mike Schwab <mike.schwab@...> 2008/07/25

> If you have so much code on one line that you feel the need for inline

[#309112] Re: inline comments in future release? — "Michael W. Ryder" <_mwryder@...> 2008/07/25

Mike Schwab wrote:

[#309113] Re: inline comments in future release? — Peña, Botp <botp@...> 2008/07/25

RnJvbTogTWljaGFlbCBXLiBSeWRlciBbbWFpbHRvOl9td3J5ZGVyQHdvcmxkbmV0LmF0dC5uZXRd

[#309165] weird backsplash behaviour inside single quotes — "Michal Suchanek" <hramrach@...>

Hello

13 messages 2008/07/25
[#309170] Re: weird backsplash behaviour inside single quotes — "Todd Benson" <caduceass@...> 2008/07/25

On Fri, Jul 25, 2008 at 8:34 AM, Michal Suchanek <hramrach@centrum.cz> wrote:

[#309171] Re: weird backsplash behaviour inside single quotes — "Todd Benson" <caduceass@...> 2008/07/25

On Fri, Jul 25, 2008 at 9:33 AM, Todd Benson <caduceass@gmail.com> wrote:

[#309173] Interesting Array Initialization Typo — Maciej Tomaka <lunatyq@...>

When initializing for example : [ [1, 2], [2, 3], [3, 2] ]

12 messages 2008/07/25

[#309194] hexdump (#171) — "Matthew Moss" <matthew.moss@...>

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

13 messages 2008/07/25

[#309273] Faster Marshaling? — Greg Willits <lists@...>

Exploring options... wondering if there's anything that can replace

13 messages 2008/07/27

[#309278] deaf grandma. — Houston Barnett-gearhart <americanpragmatic@...>

i picked up ruby 2 days ago & have been bustlin' chris pine's "learn to

25 messages 2008/07/27
[#309282] Re: deaf grandma. — "Martin DeMello" <martindemello@...> 2008/07/27

On Sat, Jul 26, 2008 at 8:31 PM, Houston Barnett-gearhart

[#309322] Re: deaf grandma. — houston barnett-gearhart <americanpragmatic@...> 2008/07/27

thank you, martin, for your reply. i took your advice & wrote an

[#309341] Re: deaf grandma. — "Martin DeMello" <martindemello@...> 2008/07/28

On Sun, Jul 27, 2008 at 2:32 PM, houston barnett-gearhart

[#309343] Re: deaf grandma. — houston barnett-gearhart <americanpragmatic@...> 2008/07/28

Martin, is there any way I can get in touch with you outside of the

[#309391] Re: deaf grandma. — "Martin DeMello" <martindemello@...> 2008/07/28

On Sun, Jul 27, 2008 at 11:51 PM, houston barnett-gearhart

[#309407] Re: deaf grandma. — houston barnett-gearhart <americanpragmatic@...> 2008/07/28

I don't know why this is so hard for me to get my head around, but

[#309387] Win32ole equivalent for Mac OS X — Nathan Loyer <4namlet@...>

Is there an equivalent library for the Win32ole library on the PC? I

12 messages 2008/07/28

[#309441] Concurrent Ruby? — Kyle Murphy <kmurph79@...>

Apologies if this is a really stupid question, I am new to programming,

14 messages 2008/07/29

[#309442] and and or in case — Pe, Botp <botp@...>

Hi All, apologies in advanced if this has been discussed already

12 messages 2008/07/29

[#309472] libxml: is it possible not to use doctype declaration? — "ruud grosmann" <r.grosmann@...>

hi all,

17 messages 2008/07/29
[#309477] Re: libxml: is it possible not to use doctype declaration? — Phlip <phlip2005@...> 2008/07/29

ruud grosmann wrote:

[#309478] Re: libxml: is it possible not to use doctype declaration? — "ruud grosmann" <r.grosmann@...> 2008/07/29

hi Phlip,

[#309488] Re: libxml: is it possible not to use doctype declaration? — Phlip <phlip2005@...> 2008/07/29

ruud grosmann wrote:

[#309572] Re: How to do methodsoverloading in — Jeff Moore <jcmoore@...>

Sunny Bogawat wrote:

12 messages 2008/07/30

[#309589] Suggestions for improving a trivial tag parser — "Gregory Brown" <gregory.t.brown@...>

Hi folks,

11 messages 2008/07/30
[#309593] Re: Suggestions for improving a trivial tag parser — "Robert Dober" <robert.dober@...> 2008/07/30

What about

[#309627] gc doesn't collect? — Roger Pack <rogerpack2005@...>

Any ideas why:

13 messages 2008/07/31

[#309646] super with block — Lou Zell <lzell11@...>

Hi all,

17 messages 2008/07/31
[#309647] Re: super with block — "Jes俍 Gabriel y Gal疣" <jgabrielygalan@...> 2008/07/31

On Thu, Jul 31, 2008 at 11:06 AM, Lou Zell <lzell11@gmail.com> wrote:

[#309692] Re: super with block — Lou Zell <lzell11@...> 2008/07/31

> Hi,

[#309650] Help me with this Numerology code please... — Web Reservoir <webreservoir@...>

Hi,

18 messages 2008/07/31

[#309653] Cool Projects — Alasdair Bell <alasdair@...>

So, anyone working on something awesome?

31 messages 2008/07/31

[#309676] How to get special directories? — Niklas Baumstark <niklas.baumstark@...>

hi all,

18 messages 2008/07/31

[#309739] RubyGems - update made a mess - help needed with Windows — Becca Girl <cschall@...>

I just did a system update of RubyGems and it just broke my rake test. I

16 messages 2008/07/31

Re: in select: interrupt

From: "Mark Firestone" <mark@...>
Date: 2008-07-01 12:24:58 UTC
List: ruby-talk #306837
Thanks for the advice.  I can provide more of the code, or all the code...

The specific error messages are:

fsed.rb:681:in 'select': Interrupt
from fsed.rb 681:in 'run'
from edit.rb:93

-or-
the application simply reports "Quit", with no error at all

Let me send you the whole loop... it's long and not refactored and a
mess.... so no laughing (out loud...)

I'm not sure what else I could provide.  Unix low level io is not one
of my skills...

Appreciate any other advice you guys could give, and I will happily
provide any info you want.

Take Care and thanks!

Mark

       while true

        if select([@in_io], nil, nil, 1)
        c = @in_io.sysread(1)
        #c = @in_io.getc
	       $lf.print"c: #{c.bytes.to_a}\n"

	       if @supress then   # if we are suppressing the mysterious
extra linefeed... we do that here.
	        @supress = false
	         c = 0.chr if c.bytes.to_a[0] = 10
	       end
	
         if @w_mode then    #We are in winodw mode, not edit mode...
      	    $lf.print "in wmode\n"
            $lf.print "c: #{c.upcase}"

	        case c
	         when "\e"      #effectively, esc this is cancel for everything
	          @w_mode = false
	          @out_io.print @state.screen_clear
	        else
           case @w_type
              when ABORT,SAVE
                if c.upcase == "Y" then
                 @state.clear if ABORT
                 @state.clear_screen
                sleep(4)
                 break
                else
                 @out_io.print @state.screen_clear
                 @w_mode = false
               end
            end
          end


	  else
      case c
      when "\cX" # exit
 	      @out_io.print @state.yes_no_window("Post message... Are you sure?")
        @w_type = SAVE
	      @w_mode = true
	    when "\cG","\eOP"
	      @out_io.print @state.help_window
        @w_type  = MESSAGE
	      @w_mode = true
      when "\cA"
 	      @out_io.print @state.yes_no_window("Abort message... Are you sure?")
        @w_type = ABORT
	      @w_mode = true
	     when "\cN" #insert line
	       @state.newline
	       @out_io.print @state.redraw(true)
	      when "\cY" #delete line
	       @state.deleteline
	       @out_io.print @state.redraw(true)
        when "\cL" # refresh
          @out_io.print @state.redraw(true)
        when "\r","\n"
	        $lf.print "i'm at newline\n"
          @state.newline
          @supress = true if @bbs_mode  #telnet seems to like to echo
linefeeds.  lets supress this ...
		      @out_io.print @state.redraw(true)
         when "\010", "\177"
           redraw = @state.backspace
           @out_io.print "\e[#{@state.current_y + @state.header_height};1H\e[K"
           @out_io.print @state.buffer.line(@state.current_y)
           @out_io.print @state.update_cursor_position
	         @out_io.print @state.redraw(true) if redraw
         when "\e" # escape
           buf = c
           else
              if buf.nil?
                chr = c.unpack("c")[0]
                if (chr >= 32 && chr <= 127)
                 out_c,redraw = @state.input_char_at_cursor(c)
                 @out_io.putc(out_c) if !out_c.nil?
		             @out_io.print @state.redraw(true) if redraw
                end
              else
                buf << c
	            	$lf.print "buf: #{buf}\n"
                case buf
		             when "\e[H","\e[1"
		              @state.home_cursor
		              @out_io.print @state.update_cursor_position
		             when "\e[F","\e[4"
		              @state.end_cursor
		              @out_io.print @state.update_cursor_position
		             when "\e[6"
                  redraw = @state.page_down
		              @out_io.print @state.redraw(true) if redraw
		             when "\e[5"
		              redraw = @state.page_up
		             @out_io.print @state.redraw(true) if redraw
		             when "\e[2"
		              @state.toggle_ins
                  @out_io.print @state.redraw(true)
                 when "\e[A"
                   redraw = @state.move_cursor_up(1)
		               if redraw
		                @out_io.print @state.redraw(true)
                   else
                    @out_io.print @state.update_cursor_position
		               end
                   buf = nil
                  when "\e[B"
		   redraw = @state.move_cursor_down(1)
		   if redraw
                    @out_io.print @state.redraw(true)
                   else
                    @out_io.print @state.update_cursor_position
		   end
                   buf = nil
                  when "\e[D"
                   @state.move_cursor_left(1)
                   @out_io.print @state.update_cursor_position
                   buf = nil
                  when "\e[C"
                  @state.move_cursor_right(1)
                  @out_io.print @state.update_cursor_position
                  buf = nil
                else
                  if buf.size >= 3
                    buf = nil
	    end
	    end
                end
              end
            end
          end
        end
        @state.buffer
      end
    end

On Tue, Jul 1, 2008 at 12:53 PM, Robert Klemme
<shortcutter@googlemail.com> wrote:
> 2008/7/1 Mark Firestone <mark@cortex-media.com>:
>> Anyone getting errors like this.... I'm working on a console mode full
>> screen editor (that Dossy kindly prototyped for me years ago).
>> Basically, it's reading $STD_IN with a select, thusly:
>>
>>
>>        if select([@in_io], nil, nil, 1)
>>        c = @in_io.sysread(1)
>>
>>
>> {lots of stuff to process the input follows...}
>>
>> Funny thing is, there seems to be a finite amount of code that can be
>> below here, in the input loop.  After I add a certian amount, I start
>> getting funny errors while I'm typing in the editor, either in select:
>> interrupt, or the program simply says "Quit" and abends.
>>
>> If I take some code out, the behaviour stops.  Problem is, I need this
>> code.  I was also having the same issues when i was using
>> term/ansicolor.  I wrote my own ansi module and this went away, until
>> I started adding code to the select loop.
>> ...
>> I've used select in this way before, on a TCP/IP socket, with no issues....
>
> Frankly, this is far too little information to come up with any
> meaningful reply.  You do not even give specific errors or stack
> traces.
>
> From what you posted I'd say it is something timing related or mixing
> sysread with other IO operations but these are a totally wild guesses.
>  Personally I start implementing with #read and only switch to
> #sysread if there is a particular reason for using this.
>
> Cheers
>
> robert
>
> --
> use.inject do |as, often| as.you_can - without end
>
>



-- 
001100010010011110100001101101110011

In This Thread