How do I tell when I'm on Cygwin?

  • Thread starter James Edward Gray II
  • Start date
R

Roy Sutton

M. Edward (Ed) Borasky said:
2. Dang, ara, you're gonna make me learn how to work SWIG on Windows,
aren't you? :)
SWIG works just fine on Windows without any sort of hocus-pocus.

Roy
 
R

Roy Sutton

Austin said:
If Matz, as usual, has a 1.8.6 release for Christmas (Matz?) I will be
recommending Curt use MinGW to compile Ruby for Windows. The
discussions that are going on with Microsoft will be continuing with
the preferred target for the VC8 build being next year's 1.9.1,
because I suspect it will take nearly that long to build the support
tools we need to make this work properly.
I recall reading a bit ago of incompatibilities when building C
extensions with different versions of the C runtime library. Will
binary extensions break or was the fear overstated or misunderstood?

Roy
 
A

Austin Ziegler

Amen! But ... it's a boatload less expensive than Reflection X. :)

If all you're after is X, try Xming. Once I found that, I fully
removed Cygwin from my work system. I didn't need the rest of the
crap.
As opposed to a cross-compile with GCC 4.1.1 on a Linux system? Just out
of curiosity, how is the Ruby on a MacOS machine compiled? Then again,
if we are helping Microsoft get VC8 "Ruby Ready", should we be helping
MinGW too?

We're not really helping them, yet. We're telling them what we need
and cannot ourselves provide. We have other problems to deal with (a
lack of a distutils-like software). IIRC, MinGW doesn't include GCC
4.1.1 at all, yet, even for cross-compiles. You're stuck with GCC 3.4.

Because I'm considering how much time it would take to get what we
*need*, I am going to target Ruby 1.9 for a VC8 release.

-austin
 
A

Austin Ziegler

I recall reading a bit ago of incompatibilities when building C
extensions with different versions of the C runtime library. Will
binary extensions break or was the fear overstated or misunderstood?

MinGW is (mostly) compatible with VC6. MinGW and VC6 are wholly
incompatible with VC7, VC7.1, and VC8 unless you do some voodoo which
may not always be possible.

In other words, they'll break, but 1.9.1 is going to break some stuff
anyway. So it's a good target and reduces the breakage until then.

-austin
 
M

M. Edward (Ed) Borasky

M. Edward (Ed) Borasky said:
Really? Curt, Austin? Is native (one-click) Ruby 1.8.5 slower on, say, a
933 MHz Pentium III running Windows than, say, a gcc-compiled (O2) Ruby
on the same hardware?

Let me drag out my matrix benchmark and dual-booted (Win XP and Gentoo
Linux) Athlon XP laptop and see for myself!

Be back later, as they say in IRC!

OK ... here we go. I actually had to re-install CygWin; I had deleted it
because I wasn't using Windows on my laptop. By the way, speaking of
laptops, I want all of you at RubyConf to know that it has gotten over
the sadness it was feeling as a dual-booted Window and Linux machine
being surrounded by Macs.

From

http://rubyforge.org/cgi-bin/viewvc.cgi/MatrixBenchmark/athlon-xp-2000.log?root=cougar&view=co
A brief test of three Ruby implementations on the same processor. First, the
processor specifications (Linux "/proc/cpuinfo"):

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : mobile AMD Athlon(tm) XP 2000+
stepping : 1
cpu MHz : 1656.440
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow ts fid vid
bogomips : 3313.62


Now, the times.

Native Windows One-Click Ruby Installer:
ruby 1.8.5 (2006-08-25) [i386-mswin32]
Matrix of dimension 256 times its inverse = identity? true
137.658000 0.060000 137.718000 (137.719000)

CygWin Ruby:
ruby 1.8.5 (2006-08-25) [i386-cygwin]
Matrix of dimension 256 times its inverse = identity? true
137.598000 0.110000 137.708000 (137.768000)

Gentoo Linux Ruby
Compiled from source with GCC 4.1.1 -O2 -march=athlon-xp -fomit-frame-pointer
ruby 1.8.5 (2006-08-25) [i686-linux]
Matrix of dimension 256 times its inverse = identity? true
107.380000 0.010000 107.390000 (107.425632)

So, it appears that on this benchmark, the One-Click and CygWin
interpreters are equal!! But GCC 4.1.1 beat them both.

Back to RAMEAU. :)
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: [OT] Re: How do I tell when I'm on Cygwin?"

|If Matz, as usual, has a 1.8.6 release for Christmas (Matz?)

I am not going to release it for Christmas this year, unless any
serious problem found.

matz.
 
M

M. Edward (Ed) Borasky

Yukihiro said:
Hi,

In message "Re: [OT] Re: How do I tell when I'm on Cygwin?"

|If Matz, as usual, has a 1.8.6 release for Christmas (Matz?)

I am not going to release it for Christmas this year, unless any
serious problem found.

matz.
What sort of serious problem? Can we help?
 
A

ara.t.howard

These are some really interesting results! I guess the benchmark you use
can make a big difference. The one I used had heavy IO, which might be part
of it. Although you would expect the cygwin dll to impart some overhead
there.

on our machines copying files with FileUtils.cp_r is just as fast as 'cp -r' -
very fast or slow disks seems to contraindicate benchmarks which do much io.
that said, every real world problem tends to do lots of io. ...ducks!

-a
 
J

James Edward Gray II

I have no idea how to install termios for Cygwin since it's not part
of the standard distribution (i don't think), and I'm not really a
Cygwin user.

However, stty is included with Cygwin, so I think highline would work
using that.

Well, if it's not installed HighLine won't find it anyway. Another
post claimed most Unix stuff will compile, so if someone manages it,
we will find it normally.

I'll try bypassing just the native Windows check and see if that's
enough.

Thanks for all the help everyone!

James Edward Gray II
 
M

M. Edward (Ed) Borasky

on our machines copying files with FileUtils.cp_r is just as fast as 'cp
-r' -
very fast or slow disks seems to contraindicate benchmarks which do much
io.
that said, every real world problem tends to do lots of io. ...ducks!

-a

And there's a black art tuning the Linux kernel memory manager to
optimize the tradeoffs between RAM for code and data, RAM for I/O
buffers and RAM for kernel tables. And I'm also guessing you've got
clustering and networking to balance as well.

It helps if you can afford a SAN with a huge cache, too. :) But, getting
back to CygWin, does anyone seriously use either CygWin or native
Windows servers in high-performance computing? I can't even imagine a
cluster of servers with a Windows 2003 or even XP Professional license
on each one, and the Windows license gets more expensive when you need
the 64-bit version.
 
J

Joel VanderWerf

M. Edward (Ed) Borasky said:
Yukihiro said:
Hi,

In message "Re: [OT] Re: How do I tell when I'm on Cygwin?"

|If Matz, as usual, has a 1.8.6 release for Christmas (Matz?)

I am not going to release it for Christmas this year, unless any
serious problem found.

matz.
What sort of serious problem? Can we help?

Doesn't sound like there are any problems yet, and there will be a
release only if there is a need to fix something serious.

(But doesn't the FXRuby loading problem caused by ruby 1.8.5 qualify as
serious? That's what's keeping me from upgrading from 1.8.4...)
 
W

Wilson Bilkovich

M. Edward (Ed) Borasky said:
Really? Curt, Austin? Is native (one-click) Ruby 1.8.5 slower on, say, a
933 MHz Pentium III running Windows than, say, a gcc-compiled (O2) Ruby
on the same hardware?

Let me drag out my matrix benchmark and dual-booted (Win XP and Gentoo
Linux) Athlon XP laptop and see for myself!

Be back later, as they say in IRC!

OK ... here we go. I actually had to re-install CygWin; I had deleted it
because I wasn't using Windows on my laptop. By the way, speaking of
laptops, I want all of you at RubyConf to know that it has gotten over
the sadness it was feeling as a dual-booted Window and Linux machine
being surrounded by Macs.

From

http://rubyforge.org/cgi-bin/viewvc.cgi/MatrixBenchmark/athlon-xp-2000.log?root=cougar&view=co
A brief test of three Ruby implementations on the same processor. First, the
processor specifications (Linux "/proc/cpuinfo"):

processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 8
model name : mobile AMD Athlon(tm) XP 2000+
stepping : 1
cpu MHz : 1656.440
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow ts fid vid
bogomips : 3313.62


Now, the times.

Native Windows One-Click Ruby Installer:
ruby 1.8.5 (2006-08-25) [i386-mswin32]
Matrix of dimension 256 times its inverse = identity? true
137.658000 0.060000 137.718000 (137.719000)

CygWin Ruby:
ruby 1.8.5 (2006-08-25) [i386-cygwin]
Matrix of dimension 256 times its inverse = identity? true
137.598000 0.110000 137.708000 (137.768000)

Gentoo Linux Ruby
Compiled from source with GCC 4.1.1 -O2 -march=athlon-xp -fomit-frame-pointer
ruby 1.8.5 (2006-08-25) [i686-linux]
Matrix of dimension 256 times its inverse = identity? true
107.380000 0.010000 107.390000 (107.425632)

So, it appears that on this benchmark, the One-Click and CygWin
interpreters are equal!! But GCC 4.1.1 beat them both.

Back to RAMEAU. :)

This has been pretty much my experience. I did a multi-way comparison
between VC6, VC7.1, Cygwin, and MinGW, and didn't see much of a
performance boost.

I have a test suite that takes about 90 seconds to run on my dual Xeon
2.8GHz / 4GB of RAM Win32 box, and 14 seconds on my MacBook. The
Windows box has similar amounts of CPU performance, twice the RAM, and
10,000 RPM hard disks instead of 5,400 RPM. It should at least be
close to the Linux / MacOS build, in my opinion.

I think a better benchmark to use here would be Legion (the Ruby
equivalent of Phalanx for Perl). test/unit seems to really flog the
weak parts of Ruby win32.
 
M

M. Edward (Ed) Borasky

Joel said:
Doesn't sound like there are any problems yet, and there will be a
release only if there is a need to fix something serious.

(But doesn't the FXRuby loading problem caused by ruby 1.8.5 qualify as
serious? That's what's keeping me from upgrading from 1.8.4...)

FXRuby has got other problems, like FXScintilla going "end of life" out
from under it.
 
J

Joel VanderWerf

M. Edward (Ed) Borasky said:
FXRuby has got other problems, like FXScintilla going "end of life" out
from under it.

That in no way affects my use of FXRuby. I've never liked FXScintilla,
and I don't have much use for it anyway, in my numerical simulation and
visualization work.

Any other problems?
 
D

David Vallner

--------------enig95AD7A06F912DD6583B860C1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

M. Edward (Ed) Borasky said:
OK ... here we go. I actually had to re-install CygWin; I had deleted i= t
because I wasn't using Windows on my laptop. By the way, speaking of
laptops, I want all of you at RubyConf to know that it has gotten over
the sadness it was feeling as a dual-booted Window and Linux machine
being surrounded by Macs.
=20

To cheer you up: http://www.penny-arcade.com/comic/2003/05/28

The "I use a Mac, and I'm an elitist asshole" fake ad strip would be
in-theme too, but I don't feel quite like trolling DHH about that anymore=
=2E

Whooops...

David Vallner


--------------enig95AD7A06F912DD6583B860C1
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFP+H4y6MhrS8astoRApsMAJsG44X65za4Cfe88E2eaumXR+L6OwCbBEZb
XL4k4aAyZdlSyTRwy/tc46c=
=VEDi
-----END PGP SIGNATURE-----

--------------enig95AD7A06F912DD6583B860C1--
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: [OT] Re: How do I tell when I'm on Cygwin?"

|(But doesn't the FXRuby loading problem caused by ruby 1.8.5 qualify as
|serious? That's what's keeping me from upgrading from 1.8.4...)

I'm afraid that I don't recognize that problem. Can you help me to
identify the problem?

matz.
 
J

Joel VanderWerf

Yukihiro said:
Hi,

In message "Re: [OT] Re: How do I tell when I'm on Cygwin?"

|(But doesn't the FXRuby loading problem caused by ruby 1.8.5 qualify as
|serious? That's what's keeping me from upgrading from 1.8.4...)

I'm afraid that I don't recognize that problem. Can you help me to
identify the problem?

Ruby 1.8.5 loads the fox16.so twice, causing a large number of "already
initialized constant" messages.

One report:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/219241

That post links to the FXRuby bug report:

http://rubyforge.org/tracker/index.php?func=detail&aid=5633&group_id=300&atid=1223

I reported it about a year ago for the 1.9 snapshot:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/117682

But at least one report (from Curt Hibbs) says that the problem doesn't
seem to affect anything important:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/220744

So maybe it's ok.... does anyone have long-term experience with 1.8.5
and fox16? Is it stable?
 
M

M. Edward (Ed) Borasky

Joel said:
Yukihiro said:
Hi,

In message "Re: [OT] Re: How do I tell when I'm on Cygwin?"
on Thu, 26 Oct 2006 01:31:58 +0900, Joel VanderWerf

|(But doesn't the FXRuby loading problem caused by ruby 1.8.5 qualify
as |serious? That's what's keeping me from upgrading from 1.8.4...)

I'm afraid that I don't recognize that problem. Can you help me to
identify the problem?

Ruby 1.8.5 loads the fox16.so twice, causing a large number of "already
initialized constant" messages.

One report:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/219241

That post links to the FXRuby bug report:

http://rubyforge.org/tracker/index.php?func=detail&aid=5633&group_id=300&atid=1223


I reported it about a year ago for the 1.9 snapshot:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/117682

But at least one report (from Curt Hibbs) says that the problem doesn't
seem to affect anything important:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/220744

So maybe it's ok.... does anyone have long-term experience with 1.8.5
and fox16? Is it stable?
I just managed to hack FXRuby for fox-1.6 into life on Sunday at
RubyConf on my Linux box. So I'd say that's not "long-term" or "stable"
just yet. I haven't actually attempted to use FXRuby other than as a
dependency in FreeRide, though.

I saw those messages when I fired up FreeRide in my One-click Windows
Ruby as well. They're scary and annoying as hell, but FreeRide does come
up. Wherever they're coming from, they should get fixed, but somehow it
doesn't strike me as a problem with 1.8.5 -- more likely coming from
whatever is calling Fox.

Ruby/Tk is looking better every day ... :)
 
C

Chris Lowis

Austin said:
(I don't know; I stopped using Cygwin as soon as I
found more useful tools that didn't require the whole bloody
framework).

Slightly off-topic, but I'd be really interested to hear of your
alternatives to Cygwin. Having to install the whole cygwin framework is
a pain, but I do like having ruby, irb, openssh, latex, and all the
usual GNU tools available through a _bash_ shell on Windows.

Do you have this kind of setup ? How do you achieve it ? With MS
Services for UNIX ?

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top