win32utils-devel@rubyforge.org
2004-Mar-20 16:53 UTC
[Win32utils-devel] namespace for File, Process?
Hi all, A user on IRC expressed an opinion that I''ve been considering myself. That is, for the Win32::File and Win32::Process classes, simply extend the existing File and Process classes, i.e. don''t put them under the Win32 namespace. That way, you don''t have to explicitly state Win32::File.hidden?, for example. You could just do File.hidden?. I guess for Process, that would mean putting fork under Kernel. What do you think? Regards, Dan _________________________________________________________________ Check out MSN PC Safety & Security to help ensure your PC is protected and safe. http://specials.msn.com/msn/security.asp
win32utils-devel@rubyforge.org
2004-Mar-20 18:00 UTC
[Win32utils-devel] namespace for File, Process?
Dan,> namespace. That way, you don''t have to explicitly state > Win32::File.hidden?, for example. You could just do File.hidden?.But then it will not work on non-Windows platform, right ? I do not see see any version of File.hidden? anywhere, unless it is on my blind spot.> I guess for Process, that would mean putting fork under Kernel.Now that I agree.> What do you think?I think we will have to convince Matz. -- Shashank
win32utils-devel@rubyforge.org
2004-Mar-20 20:30 UTC
[Win32utils-devel] namespace for File, Process?
Hi,> Hi all, > > A user on IRC expressed an opinion that I''ve been considering myself.That> is, for the Win32::File and Win32::Process classes, simply extend the > existing File and Process classes, i.e. don''t put them under the Win32 > namespace. That way, you don''t have to explicitly state > Win32::File.hidden?, for example. You could just do File.hidden?. > > I guess for Process, that would mean putting fork under Kernel. > > What do you think?For fundamental classes like File and Process classes, It is better to request standard Ruby distribution include extension libraries for Win32 File and Process. And I''d like to see Ruby can handle native Win32 thread function with Ruby thread method also. Regards, Park Heesob
win32utils-devel@rubyforge.org
2004-Mar-21 12:36 UTC
[Win32utils-devel] Re: namespace for File, Process?
>Dan,>>namespace. That way, you don''t have to explicitly state >>Win32::File.hidden?, for example. You could just do File.hidden?.>But then it will not work on non-Windows platform, right ? I do not see >see any version of File.hidden? anywhere, unless it is on my blind spot.No, you misunderstand. I''m not suggesting that we modify core Ruby. Just that we extend the File and Process/Kernel class. e.g. if I do class File; def foo; end; end; I haven''t replaced the File class just extended it. So, I just mean dropping the Win32 module/namespace in the case of File and Process (or any class that we extend). Regards, Dan _________________________________________________________________ Find a broadband plan that fits. Great local deals on high-speed Internet access. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
win32utils-devel@rubyforge.org
2004-Mar-21 14:20 UTC
[Win32utils-devel] Re: namespace for File, Process?
> No, you misunderstand. I''m not suggesting that we modify core Ruby. Just > that we extend the File and Process/Kernel class. e.g. if I do classFile;> def foo; end; end; I haven''t replaced the File class just extended it.So,> I just mean dropping the Win32 module/namespace in the case of File and > Process (or any class that we extend).Oh, I see ! So that I can simply do: #---------------------- require "win32utils" p File.hidden?("hideme.txt") #=> true #---------------------- Correct ? That is a great idea ... -- Shashank
win32utils-devel@rubyforge.org
2004-Mar-22 10:39 UTC
[Win32utils-devel] namespace for File, Process?
> -----Original Message----- > From: win32utils-devel-bounces@rubyforge.org > [mailto:win32utils-devel-bounces@rubyforge.org] On Behalf Of > win32utils-devel@rubyforge.org > Sent: Saturday, March 20, 2004 6:14 PM > To: win32utils-devel@rubyforge.org > Subject: Re: [Win32utils-devel] namespace for File, Process? > > > Hi, > <snip> > And I''d like > to see Ruby can handle native Win32 thread function with Ruby > thread method also.Won''t happen until the Ruby interpreter is thread safe. That means we''re waiting until Ruby 2.0. :( Dan