RubyGems' Module Count Soon To Surpass CPAN's
mfarver writes "According to the data gathered by modulecounts.com, the total number of modules checked into RubyGems (18,894, and growing at about 27/day) will probably exceed CPAN (18,928, and growing about 8/day) this week."
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.
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?
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.
8 of 13 people found this answer helpful. Did you?
How many of those modules are solely focused on converting a string to uppercase?
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?)
Am I part of the core demographic for Swedish Fish?
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.
There is "pythonforge" but I've never used it.
Pythonforge? Do you mean PyPI, 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.
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.
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. The most notable is Twitter who I think is starting to componentize its pieces and move the high load intensive pieces to Scala. 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.
My work here is dung.
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...
It also spews files all over /usr which confuses your packaging system
man checkinstall
Dilbert RSS feed
- Not having case statement, due to Guido's arbitrary decision making.
- Being forced to indent my code Guido's way.
Can you please show an example of indentation that's not "guido's way" and would not be accepted by Python?
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.
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.
politicians are like babies' nappies: they should both be changed regularly and for the same reasons
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!
Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
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.
Disinfect the GNU General Public Virus!
" 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.
pl-2-rb.pl converted 17,894 of those.
You're right.. you can duck-type in python. The difference is that ruby encourages it like it's a good thing.
I wrote my first program at the age of six, and I still can't work out how this website works.
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
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".
How can you _not_ duck type? Python doesn't have static typing at all...
Maybe you mean something else?
Dilbert RSS feed
search.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.
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.
"...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
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.
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!
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.
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.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
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.
I wrote my first program at the age of six, and I still can't work out how this website works.
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. 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.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Uh... sorry to burst your bubble, but there are no curly braces in python, well, not for indicating code blocks, anyway.
-- Lattyware (www.lattyware.co.uk)
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.
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.
And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
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.
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...
I learn from all my mistakes, I intend to be a genius at the end of my life.
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.
-- Lattyware (www.lattyware.co.uk)
Not just scripting languages. Objective-C does too, and is a statically compiled language.
I am TheRaven on Soylent News
"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.
CPAN Testers reports over 21000 http://stats.cpantesters.org/ I think the number on cpan.org might older... and updated less often. Guess ruby has a ways to go yet.
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.
Syllable : It's an Operating System
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
:-) Second attempt took 3 weeks.
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
I wrote my first program at the age of six, and I still can't work out how this website works.
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.
I wrote my first program at the age of six, and I still can't work out how this website works.
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.
I wrote my first program at the age of six, and I still can't work out how this website works.
You say that like you think it's a good thing.
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.
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.
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.
How many tests do each have, and how many of those do they fail?
It's still there, but there are much less activity. Do "proper" Ruby libraries need to be registered on both? Are there current projects that are still RAA-only? Are there clients for RAA?
Well, technically I'm a dev anyway. I just pretend to be a sys admin, dba, and support guy because they've fired everyone else.
It would drive me nuts going back to a system where I have to ask someone else to test stuff that may or may not work all the time rather than just doing it myself.
Maybe he is referring to the C implementation of Python which would be implemented in C and thus have curly braces....
If you are referring to the C implementation of Python you might want to clarify that. Most people seem to think you are referring to the Python language which doesn't have curly braces.
I am assuming you are talking about C Python language implementation.
*facepalm*
Back in the days of print media, graduate students used to remark that the ever expanding bound volumes of the Journal of chemical physics were enlarging so fast that in a few years they would be spreading across library shelves faster than the speed of light. But this did not violate einstein's principle because they contained no information.
If you compare older perl libs with more modern python and ruby libs you fins a lot of object oriented bloat and dependencies in the latter. It's the modern way of programming for the general case. perl tended to have more self contained solution sets, to over generalize a bit. I think this means that there's a lot of layered foam and filler in those general libraries.
After detouring in to python I've found myself going back to perl a lot. Why? well when python was young I admired it's clean lines and one way to do one thing. It made everyone elses code easy to read. the white space idea forced every one to indent the same, again making everyone elses code as easy to read as mine. loved it. But then it bloated and things depricated. Meanwhile perl just went along without changing much at all.
if you pick up an O-reily quick reference for perl it is half as thick as the one for python. Moreover it actually contains all of perl where as useful stuff in python (like regex and ties and math) is farmed out to includes. You can memorize perl and the parts you memorize are not deprecated. Whereas the includes in python are being depricated quickly.
No doubt this is the evolution of many languages. when you come in early it's clean but perhaps is missing stuff or has idiosyncrasies that need removing to extend it. Then it bloats and something new like Groovy is more sexy looking.
Perl mean while keeps simple things simple be hard things possible in the main trunk of the language.
I'd still rather write a large complex program in python. But perl has stayed suprisingly relevant, not to mention being a much better system admin language. In my dream, all shell languages would be replaced by perl.
Some drink at the fountain of knowledge. Others just gargle.
cpython is the interpreter and compiler, not some kind of amalgamation of C and Python.
-- Lattyware (www.lattyware.co.uk)
hehe.. my original post is now -1 flamebait :-D I guess the truth hurt too many people!
I wrote my first program at the age of six, and I still can't work out how this website works.
I'm sorry I meant http://en.wikipedia.org/wiki/CPython. Basically the the python interpreter/compiler is implemented in C. So basically while working on the python implementation, there are curly braces due to the C. I don't mean some amalgamation. I mean perhaps he is referring to Guido's rules for contributing to CPython in which case the contributions would be in C.....
Don't ever get a job in a big corporation. It sounds like politics isn't your thing :-)
I wrote my first program at the age of six, and I still can't work out how this website works.
Good point on the braces thing.. But I could never get past the concept of white space is significant in Python. For the very trivial reason that I use unindented code for debugging inside functions and it makes it very easy to scan quickly down a page to remove that debugging code when it's no longer in use. Totally trivial but also totally integral to how I like to work and python forces me to abandon it.. At least I couldn't figure out how to work around.
You sound like you know python and I wonder if you have any reflections on whether I'm a ninny, have a reasonable point, or other.. :)
The whole max-width-tabs/spaces thing is a rediculously outdated way of doing it.
Yep, it has been diculous over and over again.
Anyone still arguing about it is open to ridicule.
To everyone who marked this as flamebait.. I guess the truth hurts. Computer science and "managing complexity" are things that will never occur to someone who thinks perl is anything more than a temporary solution to a big problem which it didn't solve.
I wrote my first program at the age of six, and I still can't work out how this website works.
Well, I get why you'd have a problem, but I don't see that as a problem with Python. Using indenting to specify code blocks has a number of advantages - it makes sense, it's quick and easy, you generally do it anyway, it removes clutter from your code, etc...
The answer to your problem is to replace your debugging system with another one. Maybe an IDE that allows you to mark segments of code as debug code, using comments, or some other such system.
All I can really say is that I love Python having used it for some time. The design of the language tends to make a lot of sense, and is tailored towards a lot of ease of use for the programmer. If you are very used to other languages - and doing things to work around their limitations, Python can seem alien and annoying - but that's mainly because there is a better way to do it.
I know people don't like having a way to do something dictated to them, but it really does make for a great language when you are using it.
-- Lattyware (www.lattyware.co.uk)
I'm using Ruby for a personal project of mine going on for about a year now, semi-fulltime. I'd like to add that I've been programming since I was 8 years old, and have a grasp of most common procedural languages except LISP and functional languages.
If you don't like Ruby because it's too powerful for you, fine. However for my needs, Ruby has really made my system of several processes faster to create, more dynamically flexible than I first envisioned, easier to extend and refactor. In fact, my experience has been so positive, that I have almost nothing negative to say about Ruby and ActiveRecord. This is because whatever hurdles I met, I overcame them, and often enhanced my system further by learning to do things better from the higher-level and down.
What you list as weaknesses of Ruby, as a quite experienced programmer, I see as benefits:
1) "Monkey patching": I have a few files where I extend basic objects like String, Object, etc., for use with serializing and mathematical extensions I required. No I don't "monkey patch" unless required, but native float is just too horrible, so I had to modify BigDecimal to make the core functions easier to use. I also combined Msgpack (faster serialize, but doesn't support all Ruby types) and Marshal (native serializing in Ruby), to be able to serialize everything over the faster Msgpack implementation as strings of Marshal. It is faster and more compact than just using Marshal. ActiveRecord was extended because I needed lightning fast mass "insert-or-updates" to DB, for which I used temporary db tables. A very simplistic one-liner is all that is required to update any of my tables with arrays of objects. Neato.
Now, the files and lines where I extended library and core functionality is not too great, and it allowed me to stich together already accessible functionality to improve performance, and making things more readable and accessible at the same time.
For very little effort, "monkey patching" enabled me to extend my very programming environment and libraries, something which in many languages are not possible.
Of course, when abused or misunderstood, this can be negative, just like a pistol is harmful in the hands of a child. When upgrading, of course, I'll need to review and test the code to see if something's changed. But these are very small drawbacks for me, and I have minimized and compartmentalized the code.
2) Duck typing: After using Ruby, I'm on the other side of the fence. I now see absolutely no reason to declare types anywhere. What I did instead is to create standard-code to dynamically check incoming arguments of all functions. That way, I can have a sort of one-sided contract behaviour, checking for *whatever* I want in the beginning of the function using instance_eval(), and save myself all the troubles of static types altogether, while enhancing my system at the same time.
I realize the standard Ruby libraries are missing such functionality, and also the efficient error-handling routines I created, but once you have such functions in place (what you need), I see no reason for static types. In fact, getting rid of types allows for more flexible arguments and handling, better fail-checks and faster development altogether. If something is wrong, often my argument- or paranoia-checking code is picking it up instantly. Neato.
3) ActiveRecord: Yes, it's ORM, but only if you want to. You can use db-depdendent, direct sql if you like, or get faster queries using arrays of arrays instead of the more general ActiveRecord objects. What ActiveRecord has done for me, is save me from endless work with SQLs, only to change them again and again. I've also extended the functionality of ActiveRecord, to deliver fast insert-update operations. If I were stuck with creating dozens of SQLs, I would probably have missed that opportunity to optimize. Because ActiveRecord freed me, but didn't bar me, from the low-levels, I was able to optimize more from the higher-level down.
Another thing ActiveRecord has done, is make my
http://www.debunkingskeptics.com/
I see - well, most people wouldn't really refer to a problem with the code behind the implementation of Python as a problem with Python exactly. And in that case, most projects have a standard on how to format code - and that makes sense, it makes projects more readable and easier to contribute to.
-- Lattyware (www.lattyware.co.uk)
Ugh, I always make that same error. Spelling has never been one of my stronger points.
-- Lattyware (www.lattyware.co.uk)
you hand in your /. user id and go back to digg ...
Read radical news here
someone please mod the parent up to proper score. some moron modded it down, despite it stated actual facts. indeed, twitter was on rails, but when they saw that it was creating more problems than it was worth, they changed it.
Read radical news here
Yeah, I've been in the big corp. environment earlier in my career. Definitely not my preferred environment, although at least at the lower levels I can deal with it. I much prefer the more mid-sized company setting... small enough that I feel like what I do and say matters, but just big enough to not have to cut too many corners or scrap good ideas/projects constantly due to lack of resources. The place I work at was there once upon a time.
Meh, screw those people. Everyone has their own preferences based on their experience and current needs. Nothing wrong with voicing them and explaining why.
The Ruby Gems provider has been documented for as long as I can remember, long before I was actively using Puppet in production. Your failure to read the documentation does not mean Puppet "is full of booby traps", sorry.
Is it possible to Upgrade RubyGems with less than 1GB of RAM yet? Last time I tried it with only 768MB on a server, it failed ... after churning for 5 hours.
CPAN interdependencies can be a mess ... just try to install Jiffy to see this. Then you have the different Linux distros trying to make it easier - uh, sure - with their package managers. For the initial install, those are easier, but I've gotten into .deb/CPAN hell this way. At least CPAN doesn't seem to have any minimal RAM requirements. That's a big deal for VPS hosting.
I like perl.
I like ruby.
I like about 20 other languages.
Each implementation has a purpose AND each has problems. Perl works the way I think. Ruby works the way I wish I thought. Some day, ruby won't be so slow, but Java has been promising that for 15 yrs.
the documentation has improved, but the tutorial doesn't tell you everything you need to know. This is buried in the reference manual, so your first ever attempt to use puppet won't be very good.
Stuff like the inheritance model.. it's documented what it is but could provide better examples of how to use it. Eventually after figuring it out, I had a bit of a rewrite on my hands.
I've been using puppet for 2 years now and gave a talk about it at a conference. A lot of people's puppet configs overuse variables and automation stuff after not thinking the design of the system through.
We've got certain rules, like how all templates are embedded in a custom resource so you know where the variables are coming from. eg.
<%= foo %> # template
gets wrapped in:
define dotemplate($foo) { file "blah": content => template("module/blah") }
So $foo always gets passed in. If it was set elsewhere in the config, you would end up reading someone's template and not having a clue where its getting its values from.
I wrote my first program at the age of six, and I still can't work out how this website works.
Another thing I'm doing is adding directories to make things a bit easier. I have this directory structure:
classes: class inheritance of machines
modules: reusable modules. No specific data such as IP addresses allowed in here.
roles: contains the nodes. One file per machine rather than having a massive nodes file so different sysadmins don't have SVN clashes with eachother and can work a bit more independently
glue: links classes and modules together with specific data.
So in classes I've got server.pp which is inherited by dev.pp which is inherited by dev-web.pp. This calls glue::system::setup{$hostname: env => dev} to set up resolv.conf, etc. The glue stuff also uses inheritance for location-specific stuff:
class glue::base {}
class glue::location1 inherits base {}
define glue::setup($env) { include $location }
I wrote my first program at the age of six, and I still can't work out how this website works.