From: Charles Hixson Date: 2003-08-13T11:33:12+09:00 Subject: Re: [Devculture] ruby question - try Python also (fwd) Austin Ziegler wrote: >On Tue, 12 Aug 2003 06:39:57 +0900, Charles Hixsn wrote: > > >>Well, I have "some" familiarity with Ruby and Python. Don't brush off >>his comments lightly if you want Ruby to be more popular. The only way >>for Ruby to be more popular is for more people to use it. Which means >>for more peopel who are currently unfamiliar with it to use it. >> >> > >Actually, based on the comments by Anil, I would dismiss them almost >entirely out of hand. "Insufficient development" is -- as we on this list >know -- utter crap. Just because the Ruby community doesn't generally "karma >whore" the way that the Perl and Python community does at /. doesn't mean >that there's slow or "insufficient" development. I mean, the claim that the >"best" web project is a WebObject/JSP/ASP "replacement" doesn't recognise >that there are dozens of approaches to web development and doesn't recognise >any of the outstanding projects out there (Amrita, Webrick, the various >wikis and blogs, Borges, etc.). > >Further, the claim that Ruby took its syntax from Python and then added >Perlisms is utterly ludicrous. I personally find Ruby syntax *nothing* like >Python syntax, the latter being far less clear. It also suggests that the >writer has little experience with any OO language. His suggestion that Ruby >allows more obfuscated code is contrary to every experience that every >person who has actually done *any* development in Ruby. > >Not only that, he ignores the (behind-the-times, but extant) JRuby in favour >of his Python/Jython preference. No, the author of this rant doesn't know >anything about Ruby and it shows in spades. > >In answer to Phil's friend's questions directly: > > >>Does Ruby have...? / How strong is ruby in the area of...? >>- SOAP support >> >> > >SOAP4R. It's apparently as complete as most other SOAP implementations, but >as I don't (yet) do SOAP, I can't answer beyond that. > > > >>- XML support >> >> > >IMO, I didn't "get" XML development until I started playing with REXML, >which speaks very highly of Sean's concepts. > > > >>- inline web page building like asp/php/jsp >> >> > >Amrita, Eruby, various others. > > > >>- database access >> >> > >Reasonably complete. > > > >>- application server type features for data caching, database connection >>pooling, session management ala j2ee/mod_perl/php >> >> > >Various projects available. > > > >>Ruby has by far the best syntax of any language that I've encountered, >>and for many purposes it's semantics are as good as any. And it *MAY* >>have good library support. But many libraries seem to be either >>abandoned or only documented in Japanese (well, only *adequately* etc.). >> >> > >Some libraries may also be "complete." > >[snip SDL stuff: I don't know SDL] > > > >>Another thing is this wonderfully promissing thing called Pyrex. This is >>a purportedly nearly transparent interface between Python and C. It >>looks like it makes interfacing so much easier than Swig [or hand coding] >>that no comparison is reasonable. I haven't yet tried it, so this may be >>overblown, but appearantly you can write a file [or routine??] that is a >>mix of Python and C, with automatic translation between the pieces. >> >> > >Beyond RubyInline, I think that something like Pyrex is needed in Python >because the C interface is nearly as ugly as that with Perl -- or so I'm >told. Ruby has a very clean C interface, so such projects are less >necessary. > > > >>Another thing is distributable executables. Very important for many >>purposes (though I haven't needed this recently). Python has a (somewhat >>clunky) way to do this called distutils. What does Ruby have? (I mean >>by this that if Ruby has a library that can handle this, then I don't >>know about it...It's not a serious question as I don't have any need >>right now.) Now it is true that the Python distributable executables >>seem to be exe files, so they may only work on MSWindows, but to many >>people that is the vitally important place to have it work. >> >> > >Look into Exerb for Windows. There's even a GUI for it now. > >-austin >-- >austin ziegler * austin@halostatue.ca * Toronto, ON, Canada >software designer * pragmatic programmer * 2003.08.12 > * 11.40.12 > It sounds like the problems I had last time (about 8 months ago) may be largely resolved. (I know that some of the web pages that gave me grief have been redesigned...that's promissing.) Also promissing is the documentation that I found for RubyGtk2/RubyGnome. It's nearly what it needs to be, and is more than sufficient for many purposes. (Last time I checked the documentation for bit map handling wasn't in, but that's clearly not one of the things that one would work on earlier.) And just today on LinuxToday there was the announcement of a new release. I will need to look up RubyInline. Two references to it in answer to my not-really-a-question are a very strong pointer. I may not need it now, but knowing that it exists could allow me to consider Ruby for projects when it would otherwise be inconceivable. (Back after checking the references...) That looks very nice, but it doesn't *LOOK* to be in the same ballpark as Pyrex. Again, though, I haven't tried, or yet had reason to try, either approach. Certainly the coding approach taken at http://www.ruby-talk.org/blade/50763 would be expected to slow things down most remarkably. One can nearly always expect the translation between a Ruby variable and a C variable to be the slow step of a process. (OTOH, that code was created to demonstrate a relative slowdown when certain things happened, so....) The project that I'm currently planning would require getting access to a byte-mapped representation of an XPM file, and I'm contemplating the correct approach. A JIT module that was generated with an #include for the xpm file would seem to be a quite reasonable approach, which wouldn't have (i.e., didn't) occurred to me. I may be coming back to this around a month from now.