From Daniel.Berger at qwest.com Wed Feb 18 11:31:40 2009 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 18 Feb 2009 10:31:40 -0600 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api Message-ID: Hi, Anyone have any ideas on how to make win32-api compatible with 1.9.x? It seems 1.9 doesn't allow stuff like RSTRING(ptr)->len; you must instead use wrapper macros like RSTRING_LEN(ptr). I'm not really sure why. Anyway, I've added a have_macro check to the extconf.rb file, so we detect if we're on 1.9.x via: #ifndef HAVE_RSTRING_LEN #define HAVE_RSTRING_LEN xxx <- What should go here? #endif Regards, Dan From luislavena at gmail.com Wed Feb 18 11:55:26 2009 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 18 Feb 2009 14:55:26 -0200 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api In-Reply-To: References: Message-ID: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com> On Wed, Feb 18, 2009 at 2:31 PM, Berger, Daniel wrote: > Hi, > > Anyone have any ideas on how to make win32-api compatible with 1.9.x? > > It seems 1.9 doesn't allow stuff like RSTRING(ptr)->len; you must instead use wrapper macros like RSTRING_LEN(ptr). I'm not really sure why. > > Anyway, I've added a have_macro check to the extconf.rb file, so we detect if we're on 1.9.x via: > > #ifndef HAVE_RSTRING_LEN > #define HAVE_RSTRING_LEN xxx <- What should go here? > #endif > Why a macro check? This is the average working solution to it: http://github.com/fauna/mongrel/blob/HEAD/ext/http11/http11.c#L11-16 HTH, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From jftucker at gmail.com Wed Feb 18 13:04:15 2009 From: jftucker at gmail.com (James Tucker) Date: Wed, 18 Feb 2009 18:04:15 +0000 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api In-Reply-To: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com> References: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com> Message-ID: <71A86285-0B6D-4CB2-9B5B-2C8427C3494F@gmail.com> On 18 Feb 2009, at 16:55, Luis Lavena wrote: > On Wed, Feb 18, 2009 at 2:31 PM, Berger, Daniel > wrote: >> >> It seems 1.9 doesn't allow stuff like RSTRING(ptr)->len; you must >> instead use wrapper macros like RSTRING_LEN(ptr). I'm not really >> sure why. To allow restructuring of the value at the other end of ptr? > This is the average working solution to it: > > http://github.com/fauna/mongrel/blob/HEAD/ext/http11/http11.c#L11-16 Less needed here, so went for simpler: http://github.com/eventmachine/eventmachine/commit/a9cee3895048ffbd2a5e1da804b319d99ff68443 From luislavena at gmail.com Wed Feb 18 13:42:25 2009 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 18 Feb 2009 16:42:25 -0200 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api In-Reply-To: <71A86285-0B6D-4CB2-9B5B-2C8427C3494F@gmail.com> References: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com> <71A86285-0B6D-4CB2-9B5B-2C8427C3494F@gmail.com> Message-ID: <71166b3b0902181042l476f3ab3g63caea7b4947c037@mail.gmail.com> On Wed, Feb 18, 2009 at 4:04 PM, James Tucker wrote: > > On 18 Feb 2009, at 16:55, Luis Lavena wrote: > >> On Wed, Feb 18, 2009 at 2:31 PM, Berger, Daniel >> wrote: >>> >>> It seems 1.9 doesn't allow stuff like RSTRING(ptr)->len; you must instead >>> use wrapper macros like RSTRING_LEN(ptr). I'm not really sure why. > > To allow restructuring of the value at the other end of ptr? > >> This is the average working solution to it: >> >> http://github.com/fauna/mongrel/blob/HEAD/ext/http11/http11.c#L11-16 > > Less needed here, so went for simpler: > > http://github.com/eventmachine/eventmachine/commit/a9cee3895048ffbd2a5e1da804b319d99ff68443 > Hmn, that is lot of noise and conditionals through your code... What is wrong with defining those when don't exist and update your code for it? -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From Daniel.Berger at qwest.com Wed Feb 18 14:17:32 2009 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 18 Feb 2009 13:17:32 -0600 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api In-Reply-To: <71166b3b0902181042l476f3ab3g63caea7b4947c037@mail.gmail.com> References: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com><71A86285-0B6D-4CB2-9B5B-2C8427C3494F@gmail.com> <71166b3b0902181042l476f3ab3g63caea7b4947c037@mail.gmail.com> Message-ID: > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Luis Lavena > Sent: Wednesday, February 18, 2009 11:42 AM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] 1.9.x compatibility for win32-api > > On Wed, Feb 18, 2009 at 4:04 PM, James Tucker > wrote: > > > > On 18 Feb 2009, at 16:55, Luis Lavena wrote: > > > >> On Wed, Feb 18, 2009 at 2:31 PM, Berger, Daniel > >> > >> wrote: > >>> > >>> It seems 1.9 doesn't allow stuff like RSTRING(ptr)->len; you must > >>> instead use wrapper macros like RSTRING_LEN(ptr). I'm not > really sure why. > > > > To allow restructuring of the value at the other end of ptr? > > > >> This is the average working solution to it: > >> > >> > http://github.com/fauna/mongrel/blob/HEAD/ext/http11/http11.c#L11-16 > > > > Less needed here, so went for simpler: > > > > > http://github.com/eventmachine/eventmachine/commit/a9cee3895048ffbd2a5 > > e1da804b319d99ff68443 > > > > Hmn, that is lot of noise and conditionals through your code... > > What is wrong with defining those when don't exist and update > your code for it? Yeah, I think I prefer the http11.c approach. I'm a little stuck at the moment, as it appears 1.9.x has separate macros for RARRAY(ptr) vs RARRAY(ptr)->[index]. Anyone happen to know what it is? Anyway, this is what I've got so far. If anyone can fill in the "???" for me that would be swell. // Ruby 1.9.x #ifndef RSTRING_PTR #define RSTRING_PTR(s) (RSTRING(s)->ptr) #endif #ifndef RSTRING_LEN #define RSTRING_LEN(s) (RSTRING(s)->len) #endif #ifndef RARRAY_PTR #define RARRAY_PTR(a) (RARRAY(a)->ptr) #define RARRAY_?????? (RARRAY(a)->ptr[i]) #endif #ifndef RARRAY_LEN #define RARRAY_LEN(a) (RARRAY(a)->len) #endif Regards, Dan From luislavena at gmail.com Wed Feb 18 14:43:53 2009 From: luislavena at gmail.com (Luis Lavena) Date: Wed, 18 Feb 2009 17:43:53 -0200 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api In-Reply-To: References: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com> <71A86285-0B6D-4CB2-9B5B-2C8427C3494F@gmail.com> <71166b3b0902181042l476f3ab3g63caea7b4947c037@mail.gmail.com> Message-ID: <71166b3b0902181143w9a5114eu3f5fa7c803f4e7c2@mail.gmail.com> On Wed, Feb 18, 2009 at 5:17 PM, Berger, Daniel wrote: > > [...] > > I'm a little stuck at the moment, as it appears 1.9.x has separate macros for RARRAY(ptr) vs RARRAY(ptr)->[index]. Anyone happen to know what it is? > > Anyway, this is what I've got so far. If anyone can fill in the "???" for me that would be swell. > > // Ruby 1.9.x > #ifndef RSTRING_PTR > #define RSTRING_PTR(s) (RSTRING(s)->ptr) > #endif > #ifndef RSTRING_LEN > #define RSTRING_LEN(s) (RSTRING(s)->len) > #endif > > #ifndef RARRAY_PTR > #define RARRAY_PTR(a) (RARRAY(a)->ptr) > #define RARRAY_?????? (RARRAY(a)->ptr[i]) > #endif > #ifndef RARRAY_LEN > #define RARRAY_LEN(a) (RARRAY(a)->len) > #endif > This ticket has a good example: http://redmine.ruby-lang.org/issues/show/839 RARRAY_PTR(a)[i] Only RARRAY_PTR(a) needs to get defined, since the index from the array will work out of the box in both cases. Did that help? -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From Daniel.Berger at qwest.com Wed Feb 18 16:19:10 2009 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Wed, 18 Feb 2009 15:19:10 -0600 Subject: [Win32utils-devel] 1.9.x compatibility for win32-api In-Reply-To: <71166b3b0902181143w9a5114eu3f5fa7c803f4e7c2@mail.gmail.com> References: <71166b3b0902180855g4f650816i94124eb067ecb56a@mail.gmail.com><71 A86285-0B6D-4CB2-9B5B-2C8427C3494F@gmail.com><71166b3b0902181042l476f3ab3g6 3caea7b4947c037@mail.gmail.com> <71166b3b0902181143w9a5114eu3f5fa7c803f4e7c2@mail.gmail.com> Message-ID: > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Luis Lavena > Sent: Wednesday, February 18, 2009 12:44 PM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] 1.9.x compatibility for win32-api > > On Wed, Feb 18, 2009 at 5:17 PM, Berger, Daniel > wrote: > > > > [...] > > > > I'm a little stuck at the moment, as it appears 1.9.x has > separate macros for RARRAY(ptr) vs RARRAY(ptr)->[index]. > Anyone happen to know what it is? > > > > Anyway, this is what I've got so far. If anyone can fill in > the "???" for me that would be swell. > > > > // Ruby 1.9.x > > #ifndef RSTRING_PTR > > #define RSTRING_PTR(s) (RSTRING(s)->ptr) #endif #ifndef RSTRING_LEN > > #define RSTRING_LEN(s) (RSTRING(s)->len) #endif > > > > #ifndef RARRAY_PTR > > #define RARRAY_PTR(a) (RARRAY(a)->ptr) #define RARRAY_?????? > > (RARRAY(a)->ptr[i]) #endif #ifndef RARRAY_LEN #define RARRAY_LEN(a) > > (RARRAY(a)->len) #endif > > > > This ticket has a good example: > > http://redmine.ruby-lang.org/issues/show/839 > > RARRAY_PTR(a)[i] > > Only RARRAY_PTR(a) needs to get defined, since the index from > the array will work out of the box in both cases. > > Did that help? Yes, thanks. Regards, Dan From phasis at gmail.com Sat Feb 21 08:44:31 2009 From: phasis at gmail.com (Heesob Park) Date: Sat, 21 Feb 2009 22:44:31 +0900 Subject: [Win32utils-devel] RbReadline - Pure Ruby Readline Test version released Message-ID: Hi, Just a quick note to let you know that I've pushed out the first release of RbReadline - Pure Ruby Readline emulation library. It supports almost all features of GNU readline library. It runs on 1.8.x and 1.9.x on Linux and Windows. But for now it lacks of supporting multibyte character handling. Any Patches and suggestions welcome. http://121.78.227.9/rbreadline Regards, Park Heesob From djberg96 at gmail.com Sun Feb 22 09:13:19 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 22 Feb 2009 07:13:19 -0700 Subject: [Win32utils-devel] RbReadline - Pure Ruby Readline Test version released In-Reply-To: References: Message-ID: <49A15D7F.4080705@gmail.com> Heesob Park wrote: > Hi, > > Just a quick note to let you know that I've pushed out the first release of > RbReadline - Pure Ruby Readline emulation library. > > It supports almost all features of GNU readline library. It runs on > 1.8.x and 1.9.x on Linux and Windows. > But for now it lacks of supporting multibyte character handling. > Any Patches and suggestions welcome. > > > http://121.78.227.9/rbreadline Very cool. Are you going to create a separate project for this on RubyForge? Regards, Dan From djberg96 at gmail.com Sun Feb 22 20:16:45 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 22 Feb 2009 18:16:45 -0700 Subject: [Win32utils-devel] Fwd: win32utils-devel post from noreply@rubyforge.org requires approval In-Reply-To: References: Message-ID: <6037b70c0902221716n7019b0e3g2555ea6eb7c47371@mail.gmail.com> ---------- Forwarded message ---------- From: Date: Sun, Feb 22, 2009 at 11:12 AM Subject: win32utils-devel post from noreply at rubyforge.org requires approval To: win32utils-devel-owner at rubyforge.org As list administrator, your authorization is requested for the following mailing list posting: List: win32utils-devel at rubyforge.org From: noreply at rubyforge.org Subject: [ win32utils-Bugs-24057 ] $? not always set in version 0.2.7 Reason: Message has implicit destination At your convenience, visit: http://rubyforge.org/mailman/admindb/win32utils-devel to approve or deny the request. ---------- Forwarded message ---------- From: To: noreply at rubyforge.org Date: Sun, 22 Feb 2009 13:12:27 -0500 (EST) Subject: [ win32utils-Bugs-24057 ] $? not always set in version 0.2.7 Bugs item #24057, was opened at 2009-02-22 13:12 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=24057&group_id=85 Category: win32-open3 Group: None Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: $? not always set in version 0.2.7 Initial Comment: For some commands $? is not set in version 0.2.7. Seems to work in 0.2.6. Here is a script to reproduce: require 'win32/open3' include Open4 puts Open3::WIN32_OPEN3_VERSION status = popen4("echo hello") do |stdin,stdout,stderr,pid| stdout.each { |line| puts "stdout:"+line } stderr.each { |line| puts "stderr:"+line } end puts $?.inspect Ver 0.2.6 output: 0.2.6 stdout:hello # Ver 0.2.7 output: 0.2.7 stdout:hello nil ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=24057&group_id=85 ---------- Forwarded message ---------- From: win32utils-devel-request at rubyforge.org To: Date: Sun, 22 Feb 2009 13:12:29 -0500 Subject: confirm ef942643392134473777b36da844520daaf5115e If you reply to this message, keeping the Subject: header intact, Mailman will discard the held message. Do this if the message is spam. If you reply to this message and include an Approved: header with the list password in it, the message will be approved for posting to the list. The Approved: header can also appear in the first line of the body of the reply. From phasis at gmail.com Sun Feb 22 20:29:44 2009 From: phasis at gmail.com (Heesob Park) Date: Mon, 23 Feb 2009 10:29:44 +0900 Subject: [Win32utils-devel] RbReadline - Pure Ruby Readline Test version released In-Reply-To: <49A15D7F.4080705@gmail.com> References: <49A15D7F.4080705@gmail.com> Message-ID: 2009/2/22 Daniel Berger : > Heesob Park wrote: >> >> Hi, >> >> Just a quick note to let you know that I've pushed out the first release >> of >> RbReadline - Pure Ruby Readline emulation library. >> >> It supports almost all features of GNU readline library. It runs on >> 1.8.x and 1.9.x on Linux and Windows. >> But for now it lacks of supporting multibyte character handling. >> Any Patches and suggestions welcome. >> >> >> http://121.78.227.9/rbreadline > > Very cool. > > Are you going to create a separate project for this on RubyForge? > After fixing some critical bugs, I want to give the copyright and project administration to Luis Lavena and he seems to prefer github to rubyforge. Of course, I will maintain the code as a developer. Regards, Park Heesob From luislavena at gmail.com Sun Feb 22 20:45:57 2009 From: luislavena at gmail.com (Luis Lavena) Date: Sun, 22 Feb 2009 23:45:57 -0200 Subject: [Win32utils-devel] RbReadline - Pure Ruby Readline Test version released In-Reply-To: References: <49A15D7F.4080705@gmail.com> Message-ID: <71166b3b0902221745i5f2d4cb5v19fda32c8775cf7@mail.gmail.com> On Sun, Feb 22, 2009 at 11:29 PM, Heesob Park wrote: > 2009/2/22 Daniel Berger : >> Heesob Park wrote: >>> >>> Hi, >>> >>> Just a quick note to let you know that I've pushed out the first release >>> of >>> RbReadline - Pure Ruby Readline emulation library. >>> >>> It supports almost all features of GNU readline library. It runs on >>> 1.8.x and 1.9.x on Linux and Windows. >>> But for now it lacks of supporting multibyte character handling. >>> Any Patches and suggestions welcome. >>> >>> >>> http://121.78.227.9/rbreadline >> >> Very cool. >> >> Are you going to create a separate project for this on RubyForge? >> > After fixing some critical bugs, I want to give the copyright and > project administration to Luis Lavena and he seems to prefer github to > rubyforge. A Git repository can be located at RubyForge too, but GitHub offers a better way to visualize and integrate changes. I have a rake-compiler mirror at rubyforge, and both get updated when I push changes to GitHub. > Of course, I will maintain the code as a developer. > Thank you Park, this contribution already made the CPU usage of MinGW build of Ruby less than 0.5% (close to zero!). > Regards, > > Park Heesob Regards, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From jftucker at gmail.com Mon Feb 23 05:26:18 2009 From: jftucker at gmail.com (James Tucker) Date: Mon, 23 Feb 2009 10:26:18 +0000 Subject: [Win32utils-devel] RbReadline - Pure Ruby Readline Test version released In-Reply-To: References: Message-ID: On 21 Feb 2009, at 13:44, Heesob Park wrote: > Hi, > > Just a quick note to let you know that I've pushed out the first > release of > RbReadline - Pure Ruby Readline emulation library. > > It supports almost all features of GNU readline library. It runs on > 1.8.x and 1.9.x on Linux and Windows. > But for now it lacks of supporting multibyte character handling. > Any Patches and suggestions welcome. > > > http://121.78.227.9/rbreadline That is just awesome, well done :-) From Daniel.Berger at qwest.com Mon Feb 23 16:13:36 2009 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Mon, 23 Feb 2009 15:13:36 -0600 Subject: [Win32utils-devel] Hero! (was: RbReadline - Pure Ruby Readline Test version released) In-Reply-To: References: Message-ID: > > Hi, > > > > Just a quick note to let you know that I've pushed out the first > > release of RbReadline - Pure Ruby Readline emulation library. > > > > It supports almost all features of GNU readline library. It runs on > > 1.8.x and 1.9.x on Linux and Windows. > > But for now it lacks of supporting multibyte character handling. > > Any Patches and suggestions welcome. > > > > > > http://121.78.227.9/rbreadline > > That is just awesome, well done :-) Indeed it is. So much so that I've decided to nominate Heesob for a Ruby Hero award. :) http://www.rubyheroes.com Regards, Dan From jftucker at gmail.com Tue Feb 24 05:39:17 2009 From: jftucker at gmail.com (James Tucker) Date: Tue, 24 Feb 2009 10:39:17 +0000 Subject: [Win32utils-devel] Hero! (was: RbReadline - Pure Ruby Readline Test version released) In-Reply-To: References: Message-ID: On 23 Feb 2009, at 21:13, Berger, Daniel wrote: > > >>> Hi, >>> >>> Just a quick note to let you know that I've pushed out the first >>> release of RbReadline - Pure Ruby Readline emulation library. >>> >>> It supports almost all features of GNU readline library. It runs on >>> 1.8.x and 1.9.x on Linux and Windows. >>> But for now it lacks of supporting multibyte character handling. >>> Any Patches and suggestions welcome. >>> >>> >>> http://121.78.227.9/rbreadline >> >> That is just awesome, well done :-) > > Indeed it is. So much so that I've decided to nominate Heesob for a > Ruby Hero award. :) What url? > > > http://www.rubyheroes.com > > Regards, > > Dan > _______________________________________________ > win32utils-devel mailing list > win32utils-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/win32utils-devel From djberg96 at gmail.com Tue Feb 24 08:31:04 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Tue, 24 Feb 2009 06:31:04 -0700 Subject: [Win32utils-devel] Hero! In-Reply-To: References: Message-ID: <49A3F698.2090506@gmail.com> James Tucker wrote: > > On 23 Feb 2009, at 21:13, Berger, Daniel wrote: > >> >> >>>> Hi, >>>> >>>> Just a quick note to let you know that I've pushed out the first >>>> release of RbReadline - Pure Ruby Readline emulation library. >>>> >>>> It supports almost all features of GNU readline library. It runs on >>>> 1.8.x and 1.9.x on Linux and Windows. >>>> But for now it lacks of supporting multibyte character handling. >>>> Any Patches and suggestions welcome. >>>> >>>> >>>> http://121.78.227.9/rbreadline >>> >>> That is just awesome, well done :-) >> >> Indeed it is. So much so that I've decided to nominate Heesob for a >> Ruby Hero award. :) > > What url? I used http://www.rubyforge.org/projects/win32utils Dan