×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

206 comments

Huh (1)

ezzzD55J (697465) | more than 3 years ago | (#34614262)

The dots in the graph there's actually a 6 months gap in the data, and the line is still drawn to suggest perfect linear growth; horrible visualisation.

Quality has never been a concern of Rubyists. (3, Interesting)

Anonymous Coward | more than 3 years ago | (#34614596)

In general, quality and correctness have never been major concerns of the Ruby, and especially Rails, communities. Their goal is to produce large amounts of software quickly, even if it's shitty, doesn't do what it's supposed to, and even if it outright fucks up. It doesn't surprise me at all that they'd produce a blatantly incorrect graph like that.

The Ruby and Rails communities consider things like monkey patching and duck typing to be acceptable in large-scale applications. Anyone with any experience developing significant software systems knows that those are among the stupidest things you can do, and they do adversely affect the quality of the software system.

The mere concept of monkey patching should throw up red flags immediately. It's a horrible idea to change code at runtime, especially when that code is part of widely-used standard classes like String or even Object. Not only does it reduce the quality of your own code, but it can easily affect completely independent libraries your app may be using.

Then there are the ActiveRecord shenanigans. It makes Ruby developers think they don't need even a basic understanding of relational databases, so they have no idea what it's actually doing under the hood. Then they wonder why their app's performance is absolutely horrible. Well, that'll happen when your ORM fucks up and pulls in 1.5 million records into memory just to do some filtering that could have easily been done in the database.

I'd rather have CPAN's thousands of modules, most of which are extremely high quality and reliable, versus a larger number of shitty Ruby "gems".

Re:Quality has never been a concern of Rubyists. (-1, Troll)

JerkBoB (7130) | more than 3 years ago | (#34615256)

crankyanongeezersezwuh?

/me calls the waaaaahmbulance

would you like some cheese with your whine?

Re:Quality has never been a concern of Rubyists. (5, Insightful)

Bigos (857389) | more than 3 years ago | (#34615304)

The fact that Ruby and Rails make bad programming practices possible doesn't prove anything. The same can be said about any language. I'd rather apply something that has been already said about Lisp. Ruby and Rails are programmer amplifiers, making performance of bad programmers worse, and good programmers even better. Monkey patching can be a very powerful approach, if used properly. It makes possible to write very readable code. It's not so much about changing your code but rather extending it. It can be a very useful technique if used properly.

Re:Quality has never been a concern of Rubyists. (1)

kill-1 (36256) | more than 3 years ago | (#34616188)

Yes, I wonder how many gems even have a test suite. CPAN modules are pretty good in that regard.

Re:Quality has never been a concern of Rubyists. (2)

SanityInAnarchy (655584) | more than 3 years ago | (#34617018)

That's tricky.

There is a large and vocal Ruby community of behavior-driven design. Tools like RSpec in particular show just how well this works in Ruby, compared to other languages, and all the major projects (including Rails) use and encourage tests -- basically, if you want a change in Rails, you're going to need to write a test which describes the change, which fails on the current trunk and passes with your patch.

But there's also a large and nearly silent community of people who just throw up a gem (because of how absurdly easy it is) without much in the way of docs or tests. And that's cool, too -- even if your project sucks and is in ridiculously early alpha, even if you're still learning the language (or learning to program), it means it's easy to get at your code.

I haven't used CPAN enough to know how it compares, but there are very good gems, and very bad gems, and very unorthodox gems. I think you have to allow the bad ones to also allow the unorthodox ones, and I think it's a strong community overall, but CPAN was pretty damned good, so we might have a ways to go.

What I think we need more of is a way to rank and rate gems, so you don't have to be on the mailing list for months just so you know offhand that Nokogiri has replaced Hpricot (and certainly rexml) as the best html/xml parsing suite.

Re:Quality has never been a concern of Rubyists. (0)

sildur (1383455) | more than 3 years ago | (#34616448)

I'd rather have CPAN's thousands of modules, most of which are extremely crypted, versus a larger number of shitty Ruby "gems".

There, fixed for you.

Real use (4, Interesting)

isorox (205688) | more than 3 years ago | (#34614264)

Obviously there's some real projects out there using Ruby, is it mainly internal stuff? There's some big contenders for things like PHP (wikipedia probably being the biggest). Does Ruby factor in to any public-facing websites of note? Or is it mainly used in the corporate space in the area where you often find tomcat?

Re:Real use (0, Troll)

Anonymous Coward | more than 3 years ago | (#34614316)

Ruby has zero real world penetration, it's a proven non-solution championed by the hipster crowd. Twitter was the posterchild until they replaced their RAILS backend with scala running on the JVM.

Prototyping and Small Projects (5, Interesting)

eldavojohn (898314) | more than 3 years ago | (#34614356)

Obviously there's some real projects out there using Ruby, is it mainly internal stuff? There's some big contenders for things like PHP (wikipedia probably being the biggest). Does Ruby factor in to any public-facing websites of note? Or is it mainly used in the corporate space in the area where you often find tomcat?

What we use it for at my company is quick prototyping. Especially with Rails. But it's important to note that Ruby is the language and Rails is the framework. These modules could just be a niche field like academia finding it easy to write and share these modules through this site. I'd say that's unlikely given the number and you're most certainly seeing businesses promote some of this. I will say that we actively use hundreds of gems and I'm not sure what the average module:gem ratio would be in these projects -- as far as I can tell, I think it's 1:1 on a lot of the major ones we depend on.

Here's a list of some websites you might know using Ruby [storecrowd.com]. The most notable is Twitter who I think is starting to componentize its pieces and move the high load intensive pieces to Scala [theregister.co.uk]. That's not to say they're completely off of Ruby but I think it's a sign that Rails needs a little more maturity before it is going to be seen on a website the size of Facebook. You'll see small to medium efforts excel at Ruby on Rails but the very very giant beasts are still too big for it at the moment. That means that you have a high number of websites using it but the representation is skewed against it since your big sites that everyone use aren't going to trust its maturity yet.

great language. It's simple, elegant, clean and it is versatile. Rails muddies that up a bit but Rails is great for prototyping web applications. In my opinion, the increase in the number of modules shows how versatile the language is and how wildly people want to extend it. It really does have a lot of metaprogramming facets that I've been impressed with and I think that we're going to see a rise of languages like Ruby and Clojure that allow you to do interesting things like write a domain specific language (DST). But will they ever usurp the big old giant languages that command a presence? I guess only time will tell. For web programming, I prefer Ruby to Java when prototyping or writing anything for less than thousands of users. That's where it stands right now but Ruby usage has grown by leaps and bounds and I don't think this module tracking story is a fluke. I think we'll see a steady rise in Ruby modules as people explore its potential. The quality, the performance, the diversity, the revenue can all be questioned but the number of modules is most likely there.

Re:Prototyping and Small Projects (3, Insightful)

Anonymous Coward | more than 3 years ago | (#34614478)

Huge sites like Twitter or Facebook have special needs that are unlikely to be there for 9 out of 10 other sites. Sure, it's an honor to have "your" language picked at some point for such a large scale / high availability service, but they will eventually switch to something else as the technology evolves, or the needs of the site change, and so on.

Bottom line: if Twitter or Facebook used Ruby at some point in time for certain things doesn't mean it will be good for you and your site. It means it has certain qualities and you should research whether they're useful to you.

Re:Prototyping and Small Projects (1)

sourcerror (1718066) | more than 3 years ago | (#34614882)

On the other hand twitter has a Java backend (Scala to be more specific), because Ruby just didn't handle well the high load.

Re:Prototyping and Small Projects (1)

ukyoCE (106879) | more than 3 years ago | (#34615610)

but they will eventually switch to something else as the technology evolves, or the needs of the site change, and so on.

Unless the language is open source, and then you can change the language and frameworks to meet your needs instead of rewriting in a new language for 1 feature. Or being forced to throw up your hands when you find what seems to be a language or framework bug, versus being able to dig into the source, confirm it, and submit a patch.

Not saying changing languages is never the right solution, but with open source there are more options. That is actually how Facebook is still using PHP.

http://blog.facebook.com/blog.php?post=2356432130 [facebook.com]
http://developers.facebook.com/blog/post/358 [facebook.com]

Re:Real use (3, Informative)

graznar (537071) | more than 3 years ago | (#34614598)

Here's a quick list just off the top of my head: * YellowPages.com * All of the 37signals apps (Basecamp, Campfire, etc.) * Hulu * Scribd * LivingSocial * Penny Arcade * GitHub * Twitter (backend powered by a ton of stuff but their frontend is mostly Rails) * Chow.com * Oracle.Mix * Shopify * Justin.tv * Crunchbase There are a ton more public facing and even more (as you mention) sort of "behind the firewall" type stuff. Ruby (especially Rails) has stepped up as a pretty major contender in the web development arena. :)

Re:Real use (1)

burris (122191) | more than 3 years ago | (#34614606)

Ruby people make some cool tools that you can use even if your code isn't written in Ruby. Check out Chef [opscode.com] and Vagrant [vagrantup.com]. Both are configured with Ruby, which is amenable to making DSLs.

Re:Real use (1)

ToasterMonkey (467067) | more than 3 years ago | (#34615692)

Obviously there's some real projects out there using Ruby, is it mainly internal stuff? There's some big contenders for things like PHP (wikipedia probably being the biggest). Does Ruby factor in to any public-facing websites of note? Or is it mainly used in the corporate space in the area where you often find tomcat?

yes

How many of those are maintained (4, Interesting)

cerberusss (660701) | more than 3 years ago | (#34614280)

Big numbers, but you have to be very careful what you pick. Do you want to go with community-based support? Pick the most-used module. Want to maintain it yourself? Pick the one with the best code quality. Do you need specific performance? Test them all. Et cetera.

Besides, it's pretty obvious that Perl usage is slowly declining. The idiosyncrasies of Perl 5 get very annoying. And Perl 6 has been 10 years in development and is still not very popular in production and everybody is switching to more modern languages like Python and Ruby. At my job (a scientific institute), we're ditching Perl 5 for Python.

Re:How many of those are maintained (3, Insightful)

Lazy Jones (8403) | more than 3 years ago | (#34614348)

The idiosyncrasies of Perl 5 get very annoying.

Like what? I can't really think of anything annoying enough to bear mentioning, except perhaps that typos are hard to find with warnings off (and sometimes with warnings on as well).

everybody is switching to more modern languages like Python and Ruby. At my job (a scientific institute), we're ditching Perl 5 for Python.

Ruby is certainly modern, but Python? It's a poor choice IMO when it comes to fixing Perl's biggest problem, threading support/concurrency due to its GIL, some Ruby implementations fare better. We'll stick to Perl for now, our parallelizable problems are generally tackled using Gearman and apart from a lack of decent programmers, we haven't found any real issues lately.

Re:How many of those are maintained (1, Informative)

Waffle Iron (339739) | more than 3 years ago | (#34614958)

Like what?

Off the top of my head: How about no visibly defined function parameters; object oriented features are stuck on with duct tape; you have to have a deep understanding of the language to understand what's really going on when someone assigns between variables that have different sidgils; huge numbers of built-in magic 2-character variable names that you can't remember without a cheat sheet.

Re:How many of those are maintained (1)

oscartheduck (866357) | more than 3 years ago | (#34615482)

Off the top of my head: How about no visibly defined function parameters

I might be totally misreading you here, but are you saying that you can't put a function prototype into a function definition?

Re:How many of those are maintained (1)

Junta (36770) | more than 3 years ago | (#34615536)

How about no visibly defined function parameters

Well, you can, but it's optional (like a lot of perl). I actually like one aspect of an argument list that is more obviously nothing more than an open ended stack, it gets developers to think more open ended about arguments they can receive. In C, it's a relative pain, you must know the number of arguments you need. If you treat it as simple arguments being passed in, it's extremely static. If you are going to accept arbitrary number of parameters, you need the caller to tell you how deep the stack is rather than being able to tell implicitly.

object oriented features are stuck on with duct tape

When you get deep into it, this is probably still a fair criticism. However, an interesting side effect is that the well equipped programmer becomes more cognizant of the structure of things and is not confined by arbitrary simplifications in the name of ease-of-use. Of course, a good programmer will exercise self-restraint and make things comprehensible to others.

you have to have a deep understanding of the language to understand what's really going on when someone assigns between variables that have different sidgils

Most languages have something like that, a feature that is not required that isn't obvious at first blush. In my case, I avoid those operations in favor of more readable code. For example, 'my $arrlength = @array;' is something I avoid in favor of the more explicit and obvious 'my $arrlength = scalar(@array);'. They are exactly the same, but the sidgils may get overlooked in the first example. I suppose you'll say 'scalar' does not eliminate the need to have a 'deep understanding', I would say that it isn't a particularly deep bit of knowledge to know that arrays assigned to a simple variable is doing the length. deep knowledge is trying to write XS code or use gdb to debug perl at the level of C.

huge numbers of built-in magic 2-character variable names that you can't remember without a cheat sheet.

True enough there, but many are unused and again, from a style perspective, I avoid many of them (like $_ in particular).

Re:How many of those are maintained (0)

Anonymous Coward | more than 3 years ago | (#34616804)

You have been stuck somewhere before Perl 4. Try Perl 5.12.2 with Moose for OO-programming.

Re:How many of those are maintained (1)

Waffle Iron (339739) | more than 3 years ago | (#34617276)

You have been stuck somewhere before Perl 4. Try Perl 5.12.2 with Moose for OO-programming.

Optional OO add-ons == FAIL. If different projects use different incompatible class systems from random 3rd party libraries they downloaded off the web, they may as well not even be written in the same language. They won't interoperate.

Re:How many of those are maintained (1)

Junta (36770) | more than 3 years ago | (#34615626)

Perl's biggest problem in new developer 'recruitment' is a world that is obsessed with concepts of 'new is better'. This is at least the case in academia and discussion places like slashdot. In industry, I find many hands-off architects that never touch code and have next to no ongoing commitment to any particular project push hard for starting or converting to Python or Ruby (the latter is only ever mentioned with 'on Rails' at the end by these guys, even if having nothing to do with the web for some particularly clueless people). In practice, the people dealing with where the rubber meets the road most often go with perl of the scripting languages. The reason is simple, it is sufficient, relatively unchanging, and well-known. I'd rather have an 'odd' language that doesn't change it's mind about things than a language striving to be 'clean' and deprecating things left and right when people decide there is a 'cleaner' way of doing it (mainly some experiences with python projects coping with 2.x series changes over time, though admittedly going from using a project pre-adoption into python core to having that project pulled in and changed).

When it comes down to it, currently used interpreted languages are alive for a reason and generally you can choose any one you like and get to the goal without too much difficulty. Python, Perl, Ruby, even Powershell (as of 2k8r2 and 7) represent pretty capable languages to write in. Personal preference and available experience outweigh the technical differences in my opinion.

Re:How many of those are maintained (1)

bjourne (1034822) | more than 3 years ago | (#34616764)

When it comes down to it, currently used interpreted languages are alive for a reason and generally you can choose any one you like and get to the goal without too much difficulty. Python, Perl, Ruby, even Powershell (as of 2k8r2 and 7) represent pretty capable languages to write in. Personal preference and available experience outweigh the technical differences in my opinion.

The reason you say this is because you have little to no experience with Ruby or Python. I can't comment on Powershell since I don't know it enough. Though I can say without doubt that Python and Ruby is a superior choice to Perl for new systems.

Re:How many of those are maintained (4, Interesting)

Chapter80 (926879) | more than 3 years ago | (#34614468)

Besides, it's pretty obvious that Perl usage is slowly declining.

I can't comment on the trend (declining or ascending?), but it sure looks like perl is still pretty popular, on this comment from last month [slashdot.org].

It says:

Dice has a lot more programming listings than Monster.

Java - 14824 .Net OR C# - 10496
C++ - 5789
Perl - 4664
PHP - 2499
Python - 2196
Objective C - 1267
Ruby - 1169
Cobol - 638

(bolding emphasis mine)

Re:How many of those are maintained (4, Informative)

happy_place (632005) | more than 3 years ago | (#34614802)

I think Perl is a fantastic language--in fact it's my favorite language of all time. Heck, I just released a new tool at my work last week using Perl and CGI to help organize about 4 years worth of file changes from an active CVS archive into relevant categories.

Perl's not a language for the faint-hearted, however. It is not a language you sit down and instantly you have a webpage going--which is what most people want to do these days when it comes to casual programming. For that, PHP and Ruby seem to be a lot more accessible.

I've been using Perl for over ten years now, and I find that I'm still learning something new about how to use the language in fascinating ways--pretty much every day. Nothing compares to Perl's community. You can talk with experts daily if you like, on sites like http://www.perlmonks.org/ [perlmonks.org] and the documentation is all accessible at http://perldoc.perl.org/ [perl.org] or with every install of perl by just typing perldoc... I love how easy it is to move data about. It really was the first language to fully incorporate hashing as a basic operator and though variable sigils confuse a lot of people used to simpler programming languages, such notation allows for some amazingly flexible operations without the need to create lengthy method calls for every basic operation on your data structures. In Perl every symbol has specific/distinct meaning and interoperates with all others, and those combinations make for some very powerful programs with few lines of code--like how you can load full hashes by acessing them with the array operator as hash slices... and who can compare to Perl's enhanced regular expressions, especially the latest from v. 5.12...

Anyhow there are languages for the pedantic, there are languages for your project managers and your CS grads, and for your code-generators--or for outsourcing to India, and then there's languages that really get your inner geek going... and Perl definitely reigns supreme for my inner geek. :)

In fact, Some people call it magic.

After 10 years? (1, Insightful)

Viol8 (599362) | more than 3 years ago | (#34615678)

"I've been using Perl for over ten years now, and I find that I'm still learning something new about how to use the language in fascinating ways--pretty much every day."

If thats the case then either you never learnt it properly in the first place or the language is so hopelessly over complicated that it really needs to just go away and die peacefully. Its a programming language, not a dissertation by Wittgenstein - it should be logical, clear and simple.

Re:After 10 years? (3, Interesting)

Bill, Shooter of Bul (629286) | more than 3 years ago | (#34615768)

Ok, so we can cancel all Math classes after 10 years right? Because anything logical should take less time to completely learn and understand. Lets face it: Math professors are lazy bastards that don't deserve their research grants. /sarcasm

Re:After 10 years? (0)

Anonymous Coward | more than 3 years ago | (#34617012)

No. But there is a reason roman numerals fell out of use.

Re:After 10 years? (1)

sdb6247 (532003) | more than 3 years ago | (#34617178)

This is the dumbest thing I've seen anyone say on Slashdot. Yes, you're so right. If you're still learning something after ten years, it must suck.

Re:How many of those are maintained (1)

Chapter80 (926879) | more than 3 years ago | (#34617196)

Wow, I should post in my sleep more often!

I copied someone else's post, linked to it with a bad link, and got a Score 5, Interesting.

Sorry folks, here's the real link [slashdot.org]

It says
Dice has a lot more programming listings than Monster.

Java - 14824 .Net OR C# - 10496
C++ - 5789
Perl - 4664
PHP - 2499
Python - 2196
Objective C - 1267
Ruby - 1169
Cobol - 638

This is the number of jobs available using various languages. Since this article compares Ruby and Perl's respective contributed libraries, I think it's interesting that there are 4 times as many Perl jobs as Ruby jobs.

Implying that Ruby is as popular as Perl based on the library stats might be as valid as saying that Ruby is not even twice as popular as Cobol based on the job stats.... hmmm...

Re:How many of those are maintained (1)

buchner.johannes (1139593) | more than 3 years ago | (#34614540)

There is a tremendous push for Python in the scientific community (except for the people still using Fortran)

in my part of the scientific community (0)

Anonymous Coward | more than 3 years ago | (#34614562)

the people who use python think it is great, and those who don't are pretty much meh but that's as you'd expect

Re:How many of those are maintained (0)

Anonymous Coward | more than 3 years ago | (#34614628)

There is a tremendous push for Python in the scientific community (except for the people still using Fortran)

And some of them use f2py.

Re:How many of those are maintained (2)

gtirloni (1531285) | more than 3 years ago | (#34614582)

I haven't coded a line of Perl in a while. It's mostly fixing bugs in legacy Perl code and migrating everything to Python. Ruby seems to have some traction now but I find it's as hard to read as Perl. They have to much implicit information. It's convention over explicit... I don't like that.

How many of those modules? (5, Funny)

Anonymous Coward | more than 3 years ago | (#34614286)

How many of those modules are solely focused on converting a string to uppercase?

Re:How many of those modules? (1)

TheRaven64 (641858) | more than 3 years ago | (#34615312)

And how many of them are duplicating functionality of others, but with a slightly different interface? And how many are doing something that is so domain-specific that they are unlikely to be of use to anyone other than the author? And how many are so buggy that they are no use to anyone including the author?

The number of modules is an irrelevant statistic without some measure of utility. I could write a program that would generate Perl or Ruby modules (UNIX systems typically actually ship with one for Perl, in /dev/random). They'd all be useless, but I'd have more and be growing faster than either of the sites in question...

Irrelevant statistic... (5, Insightful)

pedantic bore (740196) | more than 3 years ago | (#34614296)

It doesn't matter how many modules there are. It matters how many solid, well-documented modules there are that will continue to get updates and support.

I have no opinion over how much goodness there is in CPAN versus RubyGems; maybe RubyGems is really pulling ahead. But out of nearly nineteen thousand modules, how many really matter? (and how many are just another XML library that's just slightly different and incompatible with the bajillion other XML libraries already out there?)

Re:Irrelevant statistic... (0, Troll)

Anonymous Coward | more than 3 years ago | (#34614314)

This is Ruby we're talking about... What really matters is how many of these modules "monkey patch" core classes and completely fuck up your application just by depending on them.

Re:Irrelevant statistic... (4, Interesting)

Aladrin (926209) | more than 3 years ago | (#34614354)

Even as an amateur, this is something I worry about. I realized pretty quickly how dangerous monkey patching is, but others seem to think it's the answer to everything. Need a special string manipulation function? Name it something generic and slap it on String. UGH.

I even saw where Rails had added a function to String that rewrote the request string. Then others started using it, because it was so useful. And then Rails changed the function. All those people using it for unintended functionality were now broken because the change they made wasn't something you'd expect a function named that to do.

That function was 'camelize' and is aliased to 'camelcase'. Here's the issue: It also converts '/' to '::'. This is completely unexpected from the name.

Now, I get that upgraded to a different version of a library will have some unexpected effects, but you shouldn't have to worry about something so basic as this.

Re:Irrelevant statistic... (5, Interesting)

e70838 (976799) | more than 3 years ago | (#34614544)

I fully agree. I am a Perl programmer. I like very much the syntax of ruby. At first, it seems to be as expressive as Perl without the need of cabalistics symbols ($ @ %). But when I discovered the libraries with all the inconsistent names and all the silly aliases, I felt I can wait until they fix all that.
It is normal that people writes their own modules: the default libraries are too crappy.

Re:Irrelevant statistic... (1)

TheRaven64 (641858) | more than 3 years ago | (#34615324)

I am a Perl programmer. I like very much the syntax of ruby.

Not really surprising. Ruby was designed to merge Perl syntax with Smalltalk semantics.

Re:Irrelevant statistic... (2)

EsbenMoseHansen (731150) | more than 3 years ago | (#34615132)

While I agree that changing the functionality of a library function underneath users in a non-backward-compatible way is bad, this has nothing to do with monkey-patching. What you describe would be the same in any language supporting library function, even if it was named "char* camelize(const char* input);" and written in C.

Re:Irrelevant statistic... (1)

Aladrin (926209) | more than 3 years ago | (#34617026)

The String class was monkey patched with that function, and called what anyone could call it: 'camelize' and 'camelcase'. If Rails wasn't such a large project, it's likely many other projects would have monkey patched in exactly the same way. As it is, some probably do anyhow.

And it still would have been fine, if it did exactly what you think it would, instead of adding the bit about converting slashes.

Re:Irrelevant statistic... (1)

sourcerror (1718066) | more than 3 years ago | (#34614476)

I have no experience with ruby, but I guess you could monkey patch the (ancestor of everything) Object class, to give warnings when somebody tries to change methods. But I agree, that monkey patching in general isn't a good idea. I guess that's why Java and .net doesn't support it out of the box. (Of course you can have it with JVM and .net based scripting languages.)

Re:Irrelevant statistic... (4, Insightful)

freedumb2000 (966222) | more than 3 years ago | (#34614546)

I am a huge ruby fan, but I must agree. Much more relevant would be a graph with module count and factoring in development activity. In reality, a huge number of the gems are orphans, or come never out of alpha.

But CPAN is shit (-1, Flamebait)

sqldr (838964) | more than 3 years ago | (#34614304)

I don't want to start a perl versus python war.. ok, I will., Something that python does right is provide a very complete default library. There is "pythonforge" but I've never used it. CPAN is what you get when you get every idiot on the internet to dump crap code into a global repository. There's a few gems in there, but the majority sucks. It also spews files all over /usr which confuses your packaging system and any CPAN modules worth packaging are provided by the vendor. Ruby's claim to be "more object-orientated than python" was written by someone who doesn't like python's indentation. Duck-typing as a very bad idea.

Re:But CPAN is shit (1)

Anonymous Coward | more than 3 years ago | (#34614332)

A lot of Python's standard library is bordering on garbage. It's disgusting how many glaring inconsistencies and obvious bugs there are. Unfortunately, I have to agree with Zed and suggest that Python suffers from a serious case of neglect.

Re:But CPAN is shit (1)

ST-Clock (995694) | more than 3 years ago | (#34614344)

There is "pythonforge" but I've never used it.

Pythonforge? Do you mean PyPI [python.org], the main repository for Python frameworks and libraries that is the default download location of the flurry of Python install tools (setuptools, distribute, pip) and that contains 12487 packages? You never used it? Good sir, you are missing a little something.

Re:But CPAN is shit (1)

Anonymous Coward | more than 3 years ago | (#34614352)

It also spews files all over /usr which confuses your packaging system and any CPAN modules worth packaging are provided by the vendor.

I wish I had mod points to mod this up purely for that comment.

Re:But CPAN is shit (0)

Anonymous Coward | more than 3 years ago | (#34614370)

I don't want to start a perl versus python war.. ok, I will., Something that python does right is provide a very complete default library.

As opposed to Perl, which provides absolutely no core modules at all. Oh, wait...

Re:But Python is shit due to: (1)

Anonymous Coward | more than 3 years ago | (#34614386)

- Not having case statement, due to Guido's arbitrary decision making.
- Being forced to indent my code Guido's way.

Re:But Python is shit due to: (1)

Peaker (72084) | more than 3 years ago | (#34614420)

Can you please show an example of indentation that's not "guido's way" and would not be accepted by Python?

Re:But Python is shit due to: (1)

blincoln (592401) | more than 3 years ago | (#34614738)

Can you please show an example of indentation that's not "guido's way" and would not be accepted by Python?

I can't speak for the anonymous grandparent, but the last time I played around with Python, it wouldn't accept anything that wasn't indented in a very specific way. Something like one tab per level of curly braces, and the curly braces also had to be used in a very specific way. I can't remember if it was Visual Studio-style (both opening and closing braces on their own lines) or not. It was more or less the way I indent code anyway, but the fact that whoever wrote the language micromanaged whitespace instead of leaving it up to the developers made me decide not to use it again.

I hate coding in the old-school style where the opening curly brace is on the same line as the statement that triggered the opening of the brace (it makes it hard for me to find the opening brace that matches a particular closing brace), so who's to say the language maintainers wouldn't arbitrarily start requiring me to use that style at some point? On the other hand, there are plenty of people who love using that style. The code is functionally the same, so who cares? They can code their way, and I can code mine. In any reasonable language, at least.

Re:But Python is shit due to: (1)

lattyware (934246) | more than 3 years ago | (#34615084)

Uh... sorry to burst your bubble, but there are no curly braces in python, well, not for indicating code blocks, anyway.

Re:But Python is shit due to: (2)

TapeCutter (624760) | more than 3 years ago | (#34615146)

Python doesn't use curly braces for compound statements, that's what the indents are for and why it's important to get them right. Personally the indent thing is the only part of Python that really irritates me since some editors can fuck up the tabs beyond repair. I would love to see Python use C style compound statements but even without that it's still the best programming glue I have used.

Re:But Python is shit due to: (1)

lattyware (934246) | more than 3 years ago | (#34615212)

Really, that's a flaw with the editor, not the language. What we need is to drive flexible tabstops and get everyone using them. The whole max-width-tabs/spaces thing is a rediculously outdated way of doing it.

Re:But CPAN is shit (1)

mangu (126918) | more than 3 years ago | (#34614444)

I don't want to start a perl versus python war.. ok, I will.

I think it's funny how a discussion on Ruby drifts into a Perl vs Python war, and at this point this is the post with most answers.

Not to dismiss Ruby, but perhaps surpassing CPAN in absolute numbers does not mean everything.

I have used Perl in the past, now I use mostly Python for all quick programming and a lot of other applications, as a matter of fact I use Python almost exclusively, except for those parts where nothing but C will do. And I must say that the "batteries included" philosophy of Python is working fine for me.

Why not Ruby? In my case it's personal taste alone that made me prefer Python. All in all, I have seen many good analyses of Python vs Ruby that present good arguments for Ruby, but in my case, for my own particular uses, I found Python to be more to my taste. Simpler syntax, cleaner and easier to read for one thing. For instance, the overuse of the "end" word reminds me of Fortran, "END" what? If it isn't obvious at a glance it's wasting my time. Another common argument for Ruby is Rails, but Django has been working fine for me under Python.

In conclusion, Ruby is great, but I prefer Python. However Perl is obviously not dead, yet.

Re:But CPAN is shit (1)

sourcerror (1718066) | more than 3 years ago | (#34614496)

" Duck-typing as a very bad idea."
Both Ruby and Python does duck typing, and I guess Perl too. So I don't see your point. Scripting languages do duck typing.

Re:But CPAN is shit (1)

sqldr (838964) | more than 3 years ago | (#34614560)

You're right.. you can duck-type in python. The difference is that ruby encourages it like it's a good thing.

Re:But CPAN is shit (1)

sourcerror (1718066) | more than 3 years ago | (#34614748)

Are you sure you're not confusing it with monkey-pathcing?
As Python doesn't enforce types in function calls, there really is no way to get around duck typing.

Re:But CPAN is shit (0)

Anonymous Coward | more than 3 years ago | (#34615106)

There's an easy way to get around duck-typing - inherit.

You inherit from the base class and write any damn member function you like! Those functions become members of YOUR class, not somebody else's.

Re:But CPAN is shit (1)

sourcerror (1718066) | more than 3 years ago | (#34616922)

It'll be resolved the same way during runtime. There's no static typing in Python, even classes/instances can get new methods during runtime (that's called monkey patching; and I guess they can lose them too). See metaclass protocol.

Re:But CPAN is shit (2)

Jimmy King (828214) | more than 3 years ago | (#34614834)

It's fairly straightforward where modules get installed. I personally find it great. When the distribution handles their pre-packaged modules sanely, it makes it very easy to tell which modules were installed by the distro and which from cpan. With python, at least on Debian, distro modules and pypi modules all get dumped in the same place. That gets a bit messy to me.

I also prefer CPAN with a more centralized repository for the code. Pypi seems to install crap from all over the place, it could pull from someone's personal website, sourceforge, wherever. It seems to me that CPAN is more likely to be more resilient and consistent than Pypi as Pypi ages and old modules stop being hosted and the centralized aspect gives at least a better possibility of having some sort of central checking for authenticity and a number of other possibilities that may or may not actually be happening - but they at least could.

If you've ever been involved in large scale Perl development, you'd also quickly discover that your distro of choice may not actually provide every useful Perl module. I've got a document I maintain for setting up new installations of our platform that includes a list of which modules to install from the apt repository and which modules need to be installed from CPAN either due to not existing in apt at all or needing functionality not included in the much older version of the module that is frequently included with Debian. It's not a huge list, but it's probably 10 modules that I install from CPAN, some of which install a few others as dependencies, although to be fair to hose dependencies may be included in apt as I just tell CPAN to auto install them currently.

Re:But CPAN is shit (2)

sqldr (838964) | more than 3 years ago | (#34614964)

This is ok on a single machine, but if your entire system of 90+ servers is fully configuration-managed, you can't automate this. Perl, PEAR, pythonforge, ruby gems and any other suchlike are BANNED :-) I've written a python script to convert pear tarballs into rpms :-) I trust rpm and that is the only package installer on my systems.

Re:But CPAN is shit (1)

Jimmy King (828214) | more than 3 years ago | (#34615168)

True, it would get out of hand with a large number of servers. Doesn't matter whether you're using pypi or CPAN there, though, they both suffer from the same problem when it comes to manually managing the configuration.

I'd love to have a more automated system like you've got going. Just don't have the expertise at the moment or the time get get the expertise. Management keeps letting people go and as much as I and upper management here don't like to admit it (although for different reasons), I just can't be an expert on everything.

I suppose once it becomes necessary, rather than just nice to have, I'll get on with sorting something like that out... of course with any luck I'll have moved on to somewhere that it's just not my job to be an expert on configuration management in the first place long before I hit that point here.

Re:But CPAN is shit (1)

sqldr (838964) | more than 3 years ago | (#34615762)

I believe the "Camel" has a few lines from Larry Wall saying "you don't have to know the whole of perl to use perl". Not the same with puppet.. there's booby traps everywhere. I have dev/qa/stage/live environments, so naturally I was passing this around as $environment

Turns out that $environment is a hard-coded puppet "fact", and now I need to use it. One massive perl -p -i -e coming up!

btw. The puppet tutorial will leave you none the wiser. You have to just spend time with it and use it for practice. How I did it: spent 4 months writing the config, then rm -rf and started all over again :-) Second attempt took 3 weeks.

Re:But CPAN is shit (1)

sqldr (838964) | more than 3 years ago | (#34615818)

btw.. one of the wonderful things about automated systems: devs get root. WHAAAAT? yep! less tickets for us, and if they completely screw their server up (this has never happened) I can rebuild it with a mouse click

Better still is the tickets you get actually work. They've already tried the change on their dev box, so when they want an apache change to qa/stage/live, they send you stuff which actually works, rather than "could you try this Rewrite please?" and sending the ticket backwards and forwards until you get something which works. It's bliss.

Re:But CPAN is shit (1)

Vanders (110092) | more than 3 years ago | (#34615746)

This is ok on a single machine, but if your entire system of 90+ servers is fully configuration-managed, you can't automate this.

To be totally accurate, Puppet has support for managing Ruby gems. You're right about the others, although one could probably also add PEAR support to Puppet.

Re:But CPAN is shit (1)

sqldr (838964) | more than 3 years ago | (#34615942)

o be totally accurate, Puppet has support for managing Ruby gems.

And thus my later comment about how puppet is full of booby traps :-) I've been using puppet for 2 years and stood up to give a talk about it (well, architecture design in general) and I didn't know that! Either way, I've got a script to convert gems into RPMs, so I don't need it.

Re:But CPAN is shit (1)

osvenskan (1446645) | more than 3 years ago | (#34616242)

Pypi seems to install crap from all over the place, it could pull from someone's personal website, sourceforge, wherever.

A minor quibble -- PyPI doesn't install anything from anywhere. PyPI stands for Python Package Index, the key word there being "index". It's a catalog that tells you where to find packages. Once PyPI points you to the package, it's up to you to decide whether or not you want to install it.

Does it need to be said? (-1)

Anonymous Coward | more than 3 years ago | (#34614396)

quantity != quality

Never mind the quality, feel the width (5, Insightful)

petes_PoV (912422) | more than 3 years ago | (#34614470)

Personally I don't care how many modules any repository has, just so long as the ones I want to use work properly. That will always be my primary measure of success, followed closely by how well they are documented and then by how easy they are to find and use.

Re:Never mind the quality, feel the width (1)

ascari (1400977) | more than 3 years ago | (#34614612)

Yes! I was just going to say the same thing. Please mod this man up, I don't have points!

On the other hand, perl is a "mature" language it's likely that many modules already exist and are in widespread use, thus pace of new development is slowing down. Ruby is on the up ramp of its life cycle, and consequently a lot of stuff has to be developed for it. Revisit in five years and I'd guess both repositories will have about the same number of modules.

Quick! (1)

damn_registrars (1103043) | more than 3 years ago | (#34614472)

Someone needs to write a Perl module to go through the Ruby gems to figure out which gems are redundant with other gems, or abandoned. Once those are tossed out of the count, and the Perl module count is incremented by one for this additional module, Perl should be able to hold of Ruby until at least New Years!

DLL hell (5, Insightful)

Jay Maynard (54798) | more than 3 years ago | (#34614492)

I sure hope RubyGems isn't the utter DLL hell that CPAN is. The only time I tried shipping a product based on CPAN stuff, I wound up shipping the entire bundle as one, because there's just no way to download it from CPAN and depend on having the exact versions of the modules you developed with available - and when they're not, you're stuck in a messy cycle of upgrade dependencies and API incompatibilities that are almost impossible to resolve.

Re:DLL hell (1, Offtopic)

hachete (473378) | more than 3 years ago | (#34614584)

Give this man some mod points. CPAN hell. And CPAN bloat - how many different modules for building modules does one need? 3? 4? 5?

And fragility - I made the mistake of upgrading a package once, only having to re-wind it because of the knock-on effect through the rest of the module hierarchy.

Good choice (2)

bill_mcgonigle (4333) | more than 3 years ago | (#34614932)

The only time I tried shipping a product based on CPAN stuff, I wound up shipping the entire bundle as one, because there's just no way to download it from CPAN and depend on having the exact versions of the modules you developed with available

Good choice, that's what you're supposed to do if you're shipping a product. Perl includes tools to help you do this. Fortunately, your app was probably stored on $1 worth of storage.

You could also specify a no-breakage OS (e.g. RHEL, debian stable) and write your app to what they're shipping.

Re:Good choice (1)

TheLink (130905) | more than 3 years ago | (#34615662)

Good choice, that's what you're supposed to do if you're shipping a product. Perl includes tools to help you do this.

Say your perl program needs https/SSL and needs to run on all the popular linux distros. How many packages do you have to build just to support the relatively small numbers of "Desktop Linux" users?

Correct me if I'm wrong but it seems for you'd have to build different packages for Ubuntu, Suse, Redhat, Debian, etc? Would 32/64 bit and glibc versions also make a diff?

Fortunately, your app was probably stored on $1 worth of storage.

In most cases the storage doesn't matter much. It's the amount of work involved for the $$$.

Re:Good choice (1)

bill_mcgonigle (4333) | more than 3 years ago | (#34617262)

Correct me if I'm wrong but it seems for you'd have to build different packages for Ubuntu, Suse, Redhat, Debian, etc? Would 32/64 bit and glibc versions also make a diff?

I think it would depend on the major version of OpenSSL, but they should all have OpenSSL. Same as any other app, a 32-bit version should be able to run on 64-bit OS with compatibility libs, but not without. Native needs native.

Perl modules are often available in "pure perl" and "XS" versions. The pure perl versions don't have these problems, and can be slower. The XS versions are just object code (c-compatible) and have the same problems any other bit of c code would. Sometimes the speed boost is worth it, sometimes it's not. Sometimes one or the other is available, sometimes both. Sometimes people do a port from one way to the other when speed or portability is important or not.

In general, it's easier than building for all the different flavors of Windows that are out there (2000,XP,Vista,7). Apple makes this somewhat easier by cutting off their old users at the knees pretty rapidly, but even there major library version differences can exist on the two supported releases.

Re:DLL hell (0)

Anonymous Coward | more than 3 years ago | (#34616482)

(Especially older) RubyGems has this problem, but the new Bundler stuff does a pretty good job of fixing it.

Unfortunately, Bundler is new and Ruby is old. So I'd guess the vast majority of the RubyGems repo doesn't use it. I'm not sure it's even a full 50% of the new gems using it...

pl-2-rb.pl converted 17,894 of those (3, Funny)

Anonymous Coward | more than 3 years ago | (#34614518)

pl-2-rb.pl converted 17,894 of those.

According to modulecounts... but then again... (4, Informative)

mr_mischief (456295) | more than 3 years ago | (#34614730)

search.cpan.org [cpan.org] states that there are 88,679 modules in 21,580 module distributions. It further says there have been 63,291 uploads by 8659 uploaders (authors).
Perl also has over 600 modules in the core distribution (as of 5.12.2 anyway).

On CPAN, a "module" is a module, and that's what it sounds like. A module is a program library that can be used by an application programmer. A module distribution is several related modules in a package. Some packages contain dozens of modules. Some may also contain example applications or helper applications along with the modules. PyPi also has packages which can be collections of modules. I don't mess with Python enough to tell you if that's common.

So, RubyGems has over 18,00 "gems", but what does that mean?

On RubyGems, it seems a "gem" can be anything. There are libraries there, sure. There are also applications. One, for example, is "vmail", which is a hack to let you read your GMail account in vim (using lynx for HTML mail viewing). Another is "rake", which is a software build program. You do have big frameworks pushed out as gems like "rack". There are smaller library modules that look useful, too. Then there's some stuff with no docs, no home page, and no apparent use. I found one "gem" that claims to redefined '==' to be more useful than in the standard library, but was all of 4 lines with no documentation.

RubyGems seems to have no real organization other than new, recently updated, popular, and alphabetical. There is a search.

CPAN and PyPi both have hierarchies of topics through which one can drill down. They have search, too. PyPi has probably the best combination of search and drill-down features of the three.

CPAN has some things it's pretty clear RubyGems doesn't. It has an automated build and test system for modules. It has a ticketing system for the modules right there in the public repository. It has a rating system for the packages. It has 228 mirrors worldwide for downloading the packages, too.

quantity vs quality? (0)

omission9 (178213) | more than 3 years ago | (#34614758)

Since I know members of both the Ruby and Perl community I can pretty much guarantee CPAN is the far more
functional and stable body of code!

Great, now let's work together. (4, Interesting)

bill_mcgonigle (4333) | more than 3 years ago | (#34614982)

Folks with a few spare cycles/resources who are growing tired of these 'module' measuring contests might want to throw a bone to Parrot VM [parrot.org]. Write a module in ruby, use it from perl6, python, lua, tcl, whatever, or pick any combination above.

I won't wave the red flag explicitly, but suffice it to say I look forward to good ruby performance on parrot.

Re:Great, now let's work together. (2)

Eivind Eklund (5161) | more than 3 years ago | (#34617120)

I have less hope for that than you. Using libraries (modules/frameworks/whatever) written for another language isn't usually as nice as using something that's native. There's different conventions, and there's usually features in each language that makes for an improved experience - for that language.

For instance, in Ruby, I'd expect an API to actively use blocks (continuations) for resource tracking, and a DSL based on symbols and blocks would be common. Doing this in Python or Perl would be weird.

In Python, I'd expect docstrings, and I'd expect exceptions, and the use of the standard module system, with one module per file, and the need to use import to get at the right constants etc.

In Perl, I'd expect perldoc. I'd not expect exceptions, as that's not really well supported (at least in perl 5). And I'd expect there to be distinctions between references and 'real values'.

Overall, I think that anything that's written in one language and automatically accessed from another language will interface clumsily. And if you have to write an abstraction layer to make it work, you often might as well have a native module without the quirks.

Eivind.

News at 11... (1)

offerk (764276) | more than 3 years ago | (#34615176)

So some random *Ruby* web developer (who doesn't even understand the structure of CPAN) thinks *Ruby* is getting bigger than Perl... news at 11...

The more, the worse (0)

Anonymous Coward | more than 3 years ago | (#34616072)

You say that like you think it's a good thing.

Quantity versus Quality (1)

bart416 (900487) | more than 3 years ago | (#34616908)

Ruby might have the quantity. But does it have the quality of Perl modules? I seriously doubt so. Many Ruby programmers aren't nearly as experienced as the Perl folks. Ruby will generally be used by people who think it's cool cause of it's "OO-ness" (Don't ask me why that's supposed to be a huge advantage, but that was somebody's pro-Ruby argument once). Perl on the other hand is often used by experienced system administrators. At that point you clearly see a difference in target group. Additionally Ruby isn't as nearly wide spread as Perl. Keep in mind Perl is one of the first things that gets ported to a new platform along with C/C++ compilers and other tools meaning it'll always stay ahead of Ruby no matter how it gets.
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...