Why Ruby?
codinghorror.com
codinghorror.com
I think a lot of it is Silicone Valley's attitude to being different to the rest of the world, the majority of sites are built in PHP? Sweet, let's go with something funky and different!
It's a great attitude to have for creating cool new things, I suppose, but it feels like it's moving too fast for me to keep up, is Node.js not cool anymore? What about Backbone? Lua? what the hell is Hadoop? How about a new Lisp?
For instance, I was immediately struck upon visiting family in Norway that vanishingly few shops use Ruby, and surprisingly many use .NET. I had also just finished interviewing for an opportunity on mainland Europe for a shop that uses Perl as its production language.
(I'm from Oslo, but moved one of the startups I co-founded to London 13 years ago...)
I lived in London and there were always tons of Perl jobs there and here in Paris, I'm shocked to find out that there are far more Perl jobs than I expected. It also appears to be moderately popular in Germany.
So yeah, Perl may also be "off the radar" for many people, but it's still a strong market. Interestingly I'm seeing Perl dev pay scales getting pushed up because because there was a rush of devs going to other languages a few years ago. Now there's a shortage of Perl devs but the code hasn't gone away.
Its not very interesting to be known as a Perl developer if all there is left to do is maintain legacy code.
When I asked a prospective employer why they were using Perl, the answer was in effect that it was legacy from the late 90's. I never got the impression that this legacy was an onerous impediment, however. Given the scale at which they operate, switching languages & ecosystems would be costly - and (again, due to scale) they've built up a number of customized solutions using Perl that would be time consuming to port.
IMHO, given the state of the language & its ecosystem as compared to its closest cousins (Ruby & Python), I can't really see why any new projects would be started in Perl. If anyone has a counter point I would certainly love to hear it, as I will freely admit to not having had much interaction with the Perl community as of late.
I might, if I knew what your point was. There's just a vague implication that the language and it's ecosystem are substandard to Ruby and Python. Apparently you think it's self evident, so doesn't require explanation, but I don't feel that way, so I'm not sure what to address.
Mind supplying some examples of what you feel Perl is lacking in comparison?
To jump start it, I've been using Mojolicious[1] lately, and find it a dream to work in. And of course, being able to pull from CPAN is a plus.
[1]: http://mojolicio.us/
To turn the question on its head, why should anyone choose Perl over the alternatives? I honestly have never seen a reason to switch. Not terribly many others have either, as of late. I will attempt to lay out some of my reasoning.
When evaluating a new language & ecosystem, I tend to look for an active and welcoming community, a large selection of actively maintained libraries, and lastly a language that is interesting and/or fun to develop in. I can't really pontificate with authority on how Perl fares with regards to the above 3, but I will share my perception. Feel free to contradict (of course).
1. Community : there's no doubt Perl's community has taken a bit of a hit over the last n years population wise. In addition, the Perl community has, anecdotally, a reputation for being a bit terse [1]. Nothing cut and dry here, but again nothing that stands out IMHO.
2. Libraries : by extension of a diminishing pool of active contributors, it stands to reason some modules may not be as actively supported as their counterparts in other languages. This is compounded by the uncertain state of the language's version (5,6,7?)
3. Language : I personally have enjoyed coding in Perl, and am not really too intimidated by its historical warts. It's quite possible to write readable Perl, so write-only accusations are of little concern (to me).
Notes :
* Versioning : As an outsider, the current state of Perl's versioning is confusing. Perl 6 has been in development for over a decade, and I've seen mention of Perl 5.2 being released as Perl 7. None of this reflects positively on the language as a whole as it raises concerns about future proofing and maintainability.
* Mojolicious : Looks nice. My only concern would be that, based on the GitHub commit history, it is overwhelmingly governed and contributed to by a single individual. More so than even Rails, and significantly more so than Django. This isn't necessarily a negative, but I'd certainly want to trust him before building a production app using his tool.
[1] http://blogs.perl.org/users/joel_berger/2012/10/why-people-d...
Was that the implication of the original statement? When you said you didn't see much reason for a new project to be started in Perl, I took that as any new project, even in a shop that has prior Perl experience, not a project where you are specifically looking for something different than our prior language.
Indeed, if you are already using one of Perl/Python/Ruby, I'm not sure I see a reason to switch from any one of those to any other.
If on the other hand you actually meant "When starting a new project, I see no reason to use Perl regardless of whether that's where you have experience", then we still have a discussion worth having.
> 1. Community : there's no doubt Perl's community has taken a bit of a hit over the last n years population wise. In addition, the Perl community has, anecdotally, a reputation for being a bit terse [1]. Nothing cut and dry here, but again nothing that stands out IMHO.
Did you actually read that link, or just read a section title and assume it made your point? Because the author updated that section saying that he really can't talk much on that point, because he wasn't there, and the evidence shows it to have been fairly civil.
That said, Sebastian does have a bit of a reputation for being "terse". But that's one person. Since when does one person define a whole community?
> 2. Libraries : by extension of a diminishing pool of active contributors, it stands to reason some modules may not be as actively supported as their counterparts in other languages. This is compounded by the uncertain state of the language's version (5,6,7?)
You have a lot of assumptions, and are using them as the basis for more assumptions. How much has the community decreased? What percentage of the community that are still active are contributors of modules, compared to similar communities of other languages?
Or, just look at some data: https://metacpan.org/recent Feel free to change the filter on the left to new distributions, not just new releases, to get an idea of how much active development is going on. It may be more or less than other languages, but I think what's shown should be sufficient to disabuse you of the notion that no development is going on.
As for the the version number, this is a non-issue. There is no issue of version numbers, it's a solved problem. Some people in the community occasionally bring it up because it's a sore spot, and it gets a lot of play in the tech media sites, but it's really rather simple (if different than most other languages). Perl 5 is Perl 5, and will stay so unless someone forks it and competes. Perl 6 is a new language, intended as both a successor and a companion to Perl 5. People are NOT expected to migrate Perl 5 code to Perl 6, it is a different language. This has nothing to do with the state of the language's future. Perl 5 is still being developed. Perl 6 is still being developed. Both are available, and useful, for specific subsets of uses. For Perl 6 that happens to be a somewhat smaller subset currently because of performance issues, and some portions of the spec still being fleshed out (this is a different discussion).
> 3. Language : I personally have enjoyed coding in Perl, and am not really too intimidated by its historical warts. It's quite possible to write readable Perl, so write-only accusations are of little concern (to me).
Agreed.
> * Versioning : As an outsider, the current state of Perl's versioning is confusing. Perl 6 has been in development for over a decade, and I've seen mention of Perl 5.2 being released as Perl 7. None of this reflects positively on the language as a whole as it raises concerns about future proofing and maintainability.
Blame tech media sites for taking an internal community discussion, misunderstanding the state of things, taking random suggestions from people as real community movements, and playing it up for page views. I'm sure we can agree the media isn't infallible.
I'll agree that Perl 6 is unfortunately named. If you know the eventual goals (Perl 5 interoperability) the name makes a bit more sense, but it has caused some in the Perl 5 community to feel constrained to a version number (thus the talk of Perl 7). In the end, this is a marketing problem (which is why you see it from the outside).
> * Mojolicious : Looks nice. My only concern would be that, based on the GitHub commit history, it is overwhelmingly governed and contributed to by a single individual. More so than even Rails, and significantly more so than Django. This isn't necessarily a negative, but I'd certainly want to trust him before building a production app using his tool.
There's a fair number of other people that have committed[2], but I won't argue the impression that it looks to be primarily Sebastian (even if there's supposedly 4-5 core developers, according to changelog notices). That said, from your earlier link that explained him leaving the core Catalyst team[1], he started Catalyst, so he's got some experience in this area.
I feel fairly certain others would step up to the plate if he couldn't commit as much.
[1] http://blogs.perl.org/users/joel_berger/2012/10/why-people-d...
Yeah. This wasn't about a Perl shop switching gears, but rather seen from the POV of a blank slate. I tend to think in terms of new startups, and put myself in the shoes of someone trying to bring a new product to market.
>Did you actually read that link, or just read a section title and assume it made your point?
I did. A lot of the back-and-forth in the comment section helped me make the decision to include that link as illustration.
>It may be more or less than other languages, but I think what's shown should be sufficient to disabuse you of the notion that no development is going on.
I never said "no development" was going on. Please don't put words in my mouth.
My concern is that upon requiring a module for purpose X, to find that libraries A B and C are poorly supported / no longer supported. This isn't really as simple as counting global library updates on a given day.
For what it's worth, roughly twice as many new modules were added to ruby gems during the equivalent time period [1]. The data isn't made accessible anywhere near as neatly as on metacpan, and requires futzing with the API.
>You have a lot of assumptions, and are using them as the basis for more assumptions... Did you actually read that link..I might, if I knew what your point was...Apparently you think it's self evident
Feedback : you've spent a lot of time talking about me and my perceived flaws. Not sure if this is what you intended, but this conversation feels hostile. My intention is certainly not to be on the offensive, and I hope the same holds true for you.
Ah. I assume when linked to an article that the article itself is the intended object of my attention. The comments are indeed a valid source of community info, but I also imagine an article title of the format "Why people don't like X", you're going to get some polarized views.
> I never said "no development" was going on. Please don't put words in my mouth.
You're right. My apologies. I know you weren't implying that. That was a sloppy turn of phrase on my part.
> My concern is that upon requiring a module for purpose X, to find that libraries A B and C are poorly supported / no longer supported. This isn't really as simple as counting global library updates on a given day.
Indeed, I agree with that assessment. I struggled with a way to provide the links as a way to indicate there is development while also alluding to the fact that I think number of updated and new modules over time is a bad metric for quality of modules, as well as being misleading as the number may change over time as many of the common, core needs are met, and those modules stabilize.
That said, CPAN module pages show the last updated time, as well as the dates of previous commits. The dependency (and reverse dependency) graphs available on metacpan also go a long way towards letting you know how much else a module relies on (for the purpose of assessing possible problem modules farther downstream), and how stable and mature a module is (to some degree, considering how many other modules rely on it).
> For what it's worth, roughly twice as many new modules were added to ruby gems during the equivalent time period. The data isn't made accessible anywhere near as neatly as on metacpan, and requires futzing with the API.
Yeah, I did some research, and found it a bit harder to get counts for Python and Ruby. But we agree raw count isn't all that useful, I was just including it to show that there was activity, and of a level that I would consider significant.
> Feedback : you've spent a lot of time talking about me and my perceived flaws. Not sure if this is what you intended, but this conversation feels hostile. My intention is certainly not to be on the offensive, and I hope the same holds true for you.
It's definitely not what I intended.
> I might, if I knew what your point was
Intended literally. I thought the statement was vague, and I wasn't sure the actual point, but it appeared to indicate something regarding the desirability of using Perl for new project due to the state of the language in comparison to similar languages. I was trying to be explicit.
> Apparently you think it's self evident.
Not meant to be snide, although I can see how you could take it that way. I assume assertions without explanations are put forth because the reasoning is self evident (or discerned easily enough to be self evident to those familiar). There were no explanations put forth, and if you did think it was self evident, that expresses something in itself. I have no doubt there are a great many people that will argue similar points to your original statement with little to no experience, by simple repeating claims they've heard as though they are fact.
> You have a lot of assumptions, and are using them as the basis for more assumptions
I'm not sure how you think this is hostile, but obviously by it's conclusion you do. it was in reference to a statement where you seemed to assume the Perl community was in decline, and used that to make more assumptions about module quality. You can't use community population and involvement decrease to indicate module decline because of lack of people without first qualifying community population and involvement decrease. That's what I meant about making assumptions, and using those to make more assumptions.
> Did you actually read that link, or just read a section title and assume it made your point?
A poor choice of words, but meant literally. The only portion of the article I found that might support your point there was replaced by a retraction that reversed the stance. I felt compelled to ask whether you had actually read that, or just went by the section title "The Developers are Mean/Antisocial/Stubborn/Other". A poor choice of words on my point, and you clarified your point to reference the comments, which indicates why you included that link.
> My intention is certainly not to be on the offensive, and I hope the same holds true for you.
No, I enjoy a good discussion, and actually attempt to monitor my speech (written or verbal) closely to try to avoid misunderstanding, but that's so hard to do with a natural language. :)
P.S. While it may seem like I'm trying to defend myself overly hard by addressing each point where you interpreted me as possibly hostile, I think it's important to explain my true point in each case to accurately reflect what I was trying to convey. If you interpreted them as hostile, it's possible you may have also misinterpreted my point, as tone often affects meaning. Individually addressing each allows you to look at each one anew.
Okay, that's enough meta. I do find examining the misunderstandings of an argument/discussion fascinating though...
This discussion has certainly left me interested in re-exploring the world of Perl. As minor as it sounds, I really enjoyed playing with metacpan, which as mentioned is definitely more fleshed out than its counterparts.
In addition, while perusing various Perl repos I remembered how much I once liked writing Perl, and will probably revisit it in a side project (if not production just yet).
Definitely. Even spoken English is rife with misunderstandings, and when the tone is almost entirely removed as in writing, that just makes it all the harder.
> In addition, while perusing various Perl repos I remembered how much I once liked writing Perl, and will probably revisit it in a side project (if not production just yet).
Nice to hear!
Re: metacpan, it's amazing what interesting modules show up when you follow some of the metacpan dependency graphs. IMHO, once you're above a certain number of modules, the problem starts becoming less of whether a solution exists and more about how the candidate modules rate WRT reliability, platform compatibility, dependencies you do or do not already have, etc.
Regarding -new- Perl projects, take a peek at the Mojolicious web framework [0] (because nearly everything using it is a new Perl project). It's the most fun I've had in years.
If nothing else, the Mojocasts [1] will probably bring a smile to your face (personally, I laughed out loud at times because it's so strangely simple and brilliant).
I hear about new Perl companies and positions all the time, but given that I've found myself specializing in Perl and watching the market (since I'm going freelance), I might be seeing this more than most. That being said, everything I've seen about Perl suggests that the language's main issue is that it's been so successful that many competitors have arisen and taken some market share. (Of course, the language can be quite ugly at times, but I try to encapsulate the ugliness when I can, so most people don't see it in my code).
As primarily a Perl programer, I'd say there is a fairly even split between times I'm maintaining older code and writing new code in work environments. I've played with Ruby and Python a bit (by no means extensively), and when I started a web service last month (http://www.weightgrapher.com) I used Perl.
Dancer (Web framework), DBIx::Class (ORM), and other new tools make things pretty awesome; Perl isn't all CGI.pm scripts anymore.
I don't think that's it. Personally, I switched from PHP to Ruby because 1) Ruby seemed like a great language and 2) I saw a lot of excitement about Rails and 3) it seemed like a marketable skill.
But a few people had to decide #1 for #2 and #3 to happen. I think any new technology gets its initial hype because of some merits it has, even if the hype later gets out of hand.
As far as the last part is concerned, what about R7RS Small, and later R7RS Large?
Aren't those conferences targeted at adults? Is there some assumption in english speaking countries that the average adult is offended when he hears about sex?
Because it sure as hell doesn't hold true in most non-english speaking countries...
The most memorable and amusing was the discussion by several women (some busty) of "[flopping them on the counter]", but there have also been discussions of men or parts thereof.
https://gist.github.com/seanhandley/4106776
And for more drama:
EDIT: more facts
You just made my day posting this. It's absolutely hilarious!
If I was dhh, I'd let the other smart folks have their good says without getting all defensive.
You only have to get defensive if you somehow think you are better than others. I harbor no such illusions.
Also BritRuby was cancelled because the speaker list consisted entirely of white males, which is somehow a bad thing. [3]
[1] http://geekfeminism.wikia.com/wiki/CouchDB_talk
[2] http://geekfeminism.wikia.com/wiki/RubyFringe_offers_girlfri...
[3] http://venturebeat.com/2012/11/18/britruby-conference-felled...
The dismissive tone is unnecessary, the matter was more complex than it seems. See here for a previous discussion.
The men who had a blast as partner track participants would agree that this controversy was the ultimate tempest in a teapot.
The name change happened because there was a conference to be run and there was no battle to be fought and won.
Luckily it didn't seem to matter as none of the DevChix folks had any intention of coming in the first place. A good time was had regardless:
http://www.rubyinside.com/rubyfringe-success-and-roundup-956...
It's what passes for "action" and "making the world better" in this era.
That, and BS orchestrated rage against foreign issues they are instructed to care about by their government (Tibet, Iranian elections, etc).
Which is sad for people who remember the SDS, the Vietnam protests, and so on.
Similarly in the case of PyCon: joke was crap, someone called it out. Instead of an apology and admission that it shouldn't have happened, two people lost their jobs, and a lot of whistleblowers will be discouraged from speaking out. All because people think their freedom of joke making is more important than the likelihood a woman would feel welcome.
People do know those aren't complaints about direct harassment – just about a lot of individually tiny things that, once taken together, breed an atmosphere that encourages harassment and discourages participation. And sure, some women can deal with that – but they shouldn't have.
Also, a dong joke wouldn't be an issue in a perfect world, but we're not living in one.
But the tweeted picture to a large number of followers took it well into harassment, where the joke wasn't.
The fools! Where did they go without the token woman or black or asian person?
If they had rejected someone for being black/asian/a woman/all the above, I would have understand the outrage. But in a field where 99% of the people active are white males in Britain, it makes less sense.
Should a conference about confucianism in China also find a western person to speak, or be cancelled?
Here's a quick quiz for you: name a woman/asian/black person that is active and does interesting things in the Python community? Here are the people that come to MY mind: 1) Guido, 2) Alex Gaynor, 3) Jacob Kaplan Moss, 4) several more white geeks.
Whereas in, say, web design circles I know far more women that do interesting things.
Actually, that's a pretty good idea. There are some good scholars of Confucianism who aren't Chinese, and it'd be worth getting them in.
Jessica McKellar, Hilary Mason, Wesley Chun... Cancelling a conference b/c all speakers are white male is disturbing, but it's equally disturbing the idea of "token minority" is IMO.
Mahdi Yusuf, Audrey Roy, Bryan Veloso, etc. You see what you have always seen. Open your eyes, there's more in front of you than what you consciously choose to know.
I ended up having to apologize to the woman :O
I personally like Ruby, and I always have. I'm excited to see how the community evolves over the coming years, even as I work with it less and less (professionally, I am switching to Python).
Popularity only matters to those seeking fame.
That's where — non syntetic benchmark, anecdotal real-world use — Python rips Ruby apart. I cringe every time I wait for "bundle exec {rails console|rails server|rake|cap}". At every point in development, tests and production, ruby execution feels sluggish. Our routine Python dance on my 4 years old Core 2 Duo laptop runs circles around our Ruby stuff on my desktop i7-2400.
2.0 brought Ruby into decent land, but there's so much more to do. Future developments look interesting but I fear about the performance impact of new features (such as refinements).
I'm definitely keeping an eye on Topaz.
The big problem with bundle exec (or Ruby startup times in general), is the ludicrous amount filesystem access because of searching through a ridiculous large number of files for each "require". E.g. if you have a ton of gem's installed, most "require" calls will look for the files you require relative to the root of every gem....
Much more extensive use of require_relative, and fewer search paths can fix that entirely.
Try an "strace 2>&1 -e last64,stat64,lstat,stat bundle exec [yourcommand] | less" and be prepared to be shocked at the waste.
(EDIT: This of course assumes you have strace; on most Linux distro's that's just a package install away - I don't know about OS X, and I've got no idea how to make dtrace do the same)
optimising this is not an impossible problem its just going to take time, its far from a trivial one.
You can't pretend to not know about paths.
You can make the current case faster by optimizing this and that, but it boils down to reducing the number of stat calls, and the ways to do that are:
- Minimize the number of paths in the $LOAD_PATH. Ideally there should be one path there, but that might not be practical.
- require_relative everything when you know where it is.
As a bonus you get substantial less risk of breakage because of accidental filename clashes (yes, I've had filename clashes happen several times).
Now, this isn't quick, because it'd mean making people used to require 'gem-name/file' and have gem/bundle ensure that the default load path contains a symlink to the real current include path for every gem, but this doesn't even need a single interpreter change.
The problem here is not the Ruby implementations, but the gem ecosystem: This only becomes difficult if one wants the interpreter to automagically find files you've dropped all over the filesystem.
See also https://github.com/judofyr/quickgem for a monkey-patch that speeds startup time up to 4x.
DTrace, eg.
$ sudo dtruss -d -f script/rails server
you can also attach to a PID. If you are a developer on OS X it is good to know DTrace and what it is capable of. There are a lot of default scripts installed in OS X and you can write your own (if you have ever run iosnoop or execsnoop then you have already used DTrace scripts), see:http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scr...
http://hints.macworld.com/article.php?story=2007103112182371...
EDIT: Completely unrelated, I just noticed who you are. We met in Mike's house when I came over for the launch of Edgeio. And I just realized how long ago that is.
It does make things like tests etc run way, way faster though.
After the first run most of the stat data will be cached in-memory anyway, but tens of thousands of unnecessary system calls hurts even with the actual data in memory...
There is plenty of optimisation work left to do, but the vast majority of the issues we encounter can be addresses in either the application or libraries.
Sure, Google Go is much faster, no arguing there. Python and PyPy oth would be ballpark similar to Ruby 2.0 these days from benches I have seen.
This. Ruby may be slow compared to compiled languages, but after working on Rails apps where it takes 30 seconds to run the tests, I was delighted to develop a gem using TDD. My gem has 100+ tests, and the suite starts and finishes in less than a second.
Our apps' tests suites are slow mainly because of database access, secondarily because of Rails, with Ruby itself being the smallest factor.
However, I'm quite sure that the speed difference we've observed here is not due to the language implementations at the interpreter level. The two languages are similar in performance in that respect (Python being maybe incrementally faster, but not enough to notice most of the time). The faster speed noticed in this anecdote has got to be almost entirely due to the superior efficiency of the code in the tools we're using. Bundle is just slow basically.
Atwood is talking about general runtime performance, and comparing it with the fast, mature JITed VMs that drive CLR languages. Python (and indeed other languages in its class) compare just as badly there.
But back to why you're wrong on the internet:
1. .NET licensing isn't complicated, SQL Server is. There's an easy fix for that.
2. I don't think StackOverflow really participates in the best that the .NET open source world has to offer. From the information I can read, you (and team) published a lot of the code you wrote under open source licenses, but as far as I know the StackOverflow stack didn't really interact with many (any?) open source .NET projects that weren't run by StackOverflow - e.g. writing MiniProfiler instead of working with Glimpse, working with Mono, etc.
3. There's a lot that's changed in the .NET web space in the past year as they've moved from just releasing the code (see 2 above) to accepting pull requests. This has resulted in a good amount of accepted pull requests - community contributed features which ship "in the box" and are officially supported by Microsoft. Sometimes that's lines of code, but more often it's integration of popular community libraries. If anything, that trend is accelerating.
(also posted on blog comments, but nobody reads those)
Coding Horror Fan, Jon
>Ruby isn't cool any more. Yeah, you heard me. It's not cool to write Ruby code any more. All the cool people moved on to slinging Scala and Node.js years ago. Our project isn't cool, it's just a bunch of boring old Ruby code. Personally, I'm thrilled that Ruby is now mature enough that the community no longer needs to bother with the pretense of being the coolest kid on the block.
I apologize for the inconvenience, tho I do disagree with your base premise. Regards,
Either way -- to say that C# would be a better platform for developing an open source project is far-fetched at least (the developments of the last year notwithstanding, although agreed that MS has come light years in that direction from where it was just a short while ago), and to say node would be better is, well, not uncontroversial.
I understand, given your position, this is a point of view you must advocate (although...node? really?), but neither point makes Jeff's rationale anywhere near "all wrong."
Agreed re: SQL Server vs., say, postgres. I'm actually not sure why we don't see that option (ASP MVC + postgres/mysql) a lot more often than we do.
I said that given a move away from .NET, Node would have been a better choice. I think Node is more open source friendly for a lot of reasons. For one thing, if cross platform friendliness is a primary driver, the Rails stack doesn't run easily on some of the most popular operating systems. The dev setup instructions are getting better, but they all began with "step 1. buy a mac". Is that really more enabling to the 2nd and 3rd world developers Jeff mentions? It's admittedly gotten better as they've added some Linux docs.
I also listed some reasons that C# is not really a non-starter for open source. Jeff's first two points don't really sell Ruby over .NET + Mono to me, and I explained that I don't think Jeff or StackOverflow really participated fully in the .NET open source ecosystem in a way that gave them a lot of value. There are a lot of self fulfilling prophecies in the .NET open source world.
Cool! Good to have gigs we like.
> "step 1. buy a mac". Is that really more enabling to the 2nd and 3rd world developers Jeff mentions?
Eh. Linux is just fine for Rails dev. The Mac thing is mostly a hold-over from earlier days when TextMate was the default editor, and because most Rails shops expect it. In fact one of the most "enabling" scenarios here is to take a cheap, lightweight Ubuntu dev laptop and ssh into a dedicated development server, do all your editing on vim or emacs.
> I also listed some reasons that C# is not really a non-starter for open source.
Yeah, but it's a hard sell is it not? When considering tech stacks to risk your entire project's future on, what's the practical difference between "Not Really A Non-Starter" and "Really, Really a Non-Starter"? Not much.
Windows is acceptable for Ruby development if Vagrant or JRuby is used, although the platform is admittedly not a first class citizen.
So perhaps what you actually meant to say is that Microsoft haven't stepped in to do all the work for supporting Ruby on Windows, like they did with Node?
I think Rails might have gotten farther on Windows if the community had less of an anti-Microsoft mindset from the beginning. http://www.codinghorror.com/blog/2008/02/douchebaggery.html
I think the statement that Rails might of gotten further on the windows platform is a ridiculous statement. Ruby as far back as remember is a language that prefered environment was Linux. There was a point where there was no windows version. I remember when even on OSX the installation of ruby was an endevour. OpenSsl incompatabilities, gems with c extensions that never worked right (rMagick which is a Linux first lib). So the underlying language that backs Rails is not windows friendly. There is no doubt in my mind that Windows would have been a hindrance not a positive.
Macs are only popular because for the most part they are similar enough to Linux that you can develop on a Mac and deploy to Linux. I don't know of one Rails shop that chooses to deploy on Windows.
I didn't say that Rails would have gotten farther on the Windows platform. That would be silly; you're assuming that because you're assuming I have misshapen lenses and / or am an idiot. I get that some mostly Microsoft devs are sheltered, but some aren't. I've worked with Mac and Unix going back a few decades.
What I said was that the native Windows / Node experience is probably better than the native Windows / Rails experience because the Rails community by and large really isn't all that interested in how it works on Windows (see link).
Now if a box breaks, I have to order something with the same processor equivalents. If I want to move to the cloud, I can't take my licenses with me unless I'm on a Software Assurance subscription. It limits my options, it takes organizational overhead. If I bought licenses on the processor model for two servers that I want to combine into one larger (more-core'd) server, can I do that? Can I set up VMs running it within the box (even just for testing)? What happens when the next version has a different structure? VMWare made a large licensing change that switched from CPU to RAM (or the other way around) and it hit people that had gamed their old licensing model hard.
Again, I'm not saying that the licensing is impossible, but it is a problem. With Ruby, I can launch on a $20 Linode or any number of hosting providers. Heck, with Windows, my cloud providers are limited to Amazon and Rackspace. Microsoft's stack has awesome value. Visual Studio is awesome. I prefer C# to Java and I prefer SQL Server to MySQL (and to an extent PostgreSQL since it supports things like clustered indexing and with 2012 they finally implemented a good LIMIT/OFFSET). But those goodies come with a price that's more than just dollars. There's overhead in purchasing, overhead in pre-planning, and limitations.
"Why not Node.js" would be a great post. Without taking anything away from Node, it is different. If you use Django, Pylons, Rails, .NET MVC, Play (at least the Java side), etc. Rails should feel familiar. Some people don't like evented programming. I think a lot of people don't like JavaScript as well. It's ok in my book, but I doubt it would be so popular if it weren't the only language that browsers spoke. Similarly, it wouldn't be faster if companies like Google weren't pouring energy into it. Node.js offers some wonderful benefits. Event-driven programming with non-blocking IO can be wonderful for many things. The V8 JavaScript engine is fast. But "why not Node.js" would really be "why not evented?" The answer might be something lame like, "well, people are comfortable with MVC and process-based concurrency is easy and we're not planning on doing something that an evented model would give us a huge boost." Again, evented programming is very useful, but it's also different. While I think all CS programs should teach concurrency, some don't and even people who went through such a program don't always like it. Processes are simple (even if they waste cycles context switching, even if they flush the TLB). Node.js has done our broader community a great service by bringing up evented programming and creating a good environment for those who want it. But the answer to "Why not node?" could simply be "I didn't feel like evented programming". No matter what their differences, MVC frameworks are more alike to each other.
If you're talking about the cloud, you should definitely include Windows Azure in the mix, especially Windows Azure Web Sites. You can spin up sites for free and just start paying when you want a custom domain, it runs Node / Python /PHP / ASP.NET (without any changes to cloudify), you get FTP access, etc.). With ASP.NET in Windows Azure Web Sites you don't have any licensing considerations or costs, either.
:-)
Another plus for Ruby is JRuby. It's very nice to have access to JVM libraries from time to time.
Everytime a performance thing comes up I still think "Try JRuby if it is that much of a problem"
Of course there are downsides but the code itself is not one of them. Most apps will run on JRuby without trouble without any conversion work.
The biggest obstacle I think is the switch from things like passenger / unicorn to totally unfamiliar servers like trinidad or torquebox (and the inevitable breakdown of jruby to java abstractions when you want to try advanced stuff and you have to learn java'isms like JMX etc.)
It didn't actually occur too strongly in this case but if ever I see a blog post about "Ruby didn't perform well enough" and they DIDN'T give jruby a try then my forehead gets a slapping.
JRuby - The forgotten option between more hardware and switching to a different language.
[Edit] Actually I should clarify, I have not yet compared ruby2 vs jruby and the applications I write tend to be very multi-threaded which plays into jruby's hands.
In the end, for new projects if you want to use the JVM, it's way better to use a language that was grown on top of the JVM. Like Scala or Clojure, or maybe even Java 8 when it comes out. Which is exactly what I personally did, being tired of the limitations that the reference Python/Ruby interpreters have.
Not ideal but one option.
Regarding mixing jars / maven and bundler. Well to be honest I have never been in that position w.r.t maven but including jars in a project has never really been a problem for me. (Plus on MRI those jars wouldn't have been available in the first place!)
JRuby is great, all I'm saying is that when you feel the taste of a competent virtual machine there's no going back :-)
http://martinsprogrammingblog.blogspot.com/2012/02/why-is-cl...
Now I love Charlie's work and would port to JRuby in a blink if it was faster. But as it is now, for us, it is not.
I think it would somehow be very hard to get people excited about contributing to the effort to build a new, amazing piece of forum software... in Java.
Clojure, maybe ;)
On server-side, you have a lot of alternatives you can choose from, but on Android, most of the time, you don't have the choice.
Java is still the No.1 language but it is unhealthy (IMO) if most indie developers prefer to ignore it, despite the benefits it bring.
Don't underestimate what effect Java 8 will have. Sure, closures are old by now, but JDK 8 combines them with streams, similar to those that have become popular in Scala and Haskell. You can write stuff like this,
https://github.com/mikaelhg/lambda-demo/blob/master/src/main...
without creating intermediate lists or whatever. Replace a call to a collection's stream method by parallelStream and subsequent operations such as map are parallelized.
Java 8 is perhaps not `Haskell cool', but you'll be able to get it past management and still enjoy some of the functional programming fun.
(Now, give me value structs and reified generics Oracle!)
I think a lot of technologies where the ability to convince management to use it is a feature are ones that don't get individual open-source contributors the most excited, unfortunately.
Maybe I'm naive to Java's open-source community, but from the outside I don't envision it to be as active as Ruby's (at least outside of Android), even with Ruby no longer being "the cool thing".
Actually, that was my view too. In my previous job, I had used C, C++, Prolog, and some Haskell for four years. My outside view was that the Java opensource ecosystem is boring. My current employer uses Java almost exclusively, and I have to admit being surprised how much high-quality open source libraries are available, packaged up for Maven.
I still think that Java is so-so, but the open source ecosystem is quite strong, and there are really excellent IDEs (such as IntelliJ IDEA).
Check out this slides: http://www.slideshare.net/blackducksoftware/open-source-by-t...
http://www.jboss.org/projects http://projects.apache.org/indexes/quick.html
The big exception is Play! Framework but that seems to have mainly shifted over to the Scala side of things.
And regarding editing XML in some other required places - you can use Gradle instead of Maven or Ant (thus no XML files). But that's not the point, to get rid of all XML on your server. The point is that in the application code you are not obliged to use XML.
So to answers your question: you don't hear about Stripes because Stripes is bad at marketing. Just look at their website - it looks like its from the 90s. A small bit of CSS work is probably the best thing Stripes could do to increase user base.
Dude, Play 2.x is perfectly fine for Java and will always support both languages.
I also hated Play 1.x because it relied on its own half-baked build system, making it hard to import Maven modules and because the templates were written in Groovy, which for me was a big turn-off, because I like the JVM for its potential for performance and using such a slow dynamic language for its templating was a big no-no (Groovy may have gotten better in the meantime, I don't really know). It also relied on many runtime hacks and bytecode generation, things that have been moved at compile time in Play2 with the help of its SBT integration.
There's many things to like about its preference for the Scala way of doing things. Don't let that stand in the way, as otherwise it's a nice framework.
Last year Groovy 2 was released which provides a @CompileStatic annotation which directs the compiler to statically compile the tagged code which runs faster. Not many people seem to be using it though, e.g. Grails and Gradle only use dynamically compiled Groovy code (afaik). And it's still quite buggy, e.g. just yesterday this serious bug was reported: http://groovy.329449.n5.nabble.com/BUG-in-CompileStatic-mode...
get(new Route("/") {
@Override
public Object handle(Request request, Response response) {
Integer age = request.queryMap("user").get("age").integerValue();
//do stuff
}
});
is cleaner and easier to read than this (JAX-RS): @GET @Path("/")
public Response get(@QueryParam("user[age]") Integer age) {
//do stuff
}
It gets far worse if you think about what it takes to marshall a JSON response in spark...> It is thanks to Anders' expert guidance that .NET started out such a remarkably well designed language - literally what Java should have been on every conceivable level
This made me happy.
Also don't forget Haskell.
For those not in the know, these are programming languages used mostly for developing mathematical proofs. They are all dependently-typed languages, which means that a type can depend on the values it contains. For example, you can constrain a function to only accept lists of a given length in a way that can be type-checked.
Just in case that went over your head and to reiterate, that means that:
printf "Hello %s" 4
would generate a type error, so would: printf "Hello %s" "wor" "ld!"
and: printf "Hello %s! %s" "world"
but: printf "%s %s!" "Hello" "world"
wouldn't.From what I've seen it's been a one-way street from Java -> Scala. I've yet to meet anyone who wants to go back to Java after Scala. Play! is written in Scala by the way...
Those users may be core Java developers who don't use any frameworks. If you ask me, Scooter is quite is easy to port any Ruby code easily than any other Scala frameworks out there. Scala adoption is killing Play community (2 times it got forked due to the difference) and that's why they now market it for both Scala and Play. As someone mentioned in Play forum long time ago, Scala is not suitable for team due to its readability. Heck I myself (and our team) used Scala and moved back to Java Play.
Going through the HN job postings, my findings are:
Ruby with 6.5 jobs
Python with 4
Java and ObjC each with 2
Node.js and CoffeScript each with 1
Sorry for not sourcing anything, I don't want a massive post. Seems Ruby is still pretty cool. Anyway, this is quite the normal distribution here from my experience. And in the interest of full disclosure -- I am not a Ruby developer.
Which was maybe the goal, but I don't think so.
The obvious choice IMO was to suck it up and live with PHP. Nowhere near as nice as the other options, but exponentially less friction for people to set up on a LAMP stack. I'm not going to all-out defend PHP, but it's not as bad as it used to be; and you don't have to use it as much as you used to, given that Discourse is heavily a client-side JavaScript app anyway.
Ruby is okay. I like how extremely easy it is to pick up. I don't like that this probably leads to similar problems the PHP ecosystem developed eventually.
One query though: All that talk about the shiny new hardware and Ruby being slower in rendering pages under 50ms and the comparison to StackOverflow; isn't that a little unfair? I am trying to understand better and not making claims of knowing better than Jeff. :)
How can you compare a completely server side solution (in ASP.NET MVC) to an almost completely client side solution (in Ember.js), which only uses the Rails API for the backend alone and say .NET is superior to Ruby? Especially when the page rendering time seems to be the only profiled checkpoint for the performance.
Wouldn't JavaScript and the whole Ember.js be adding to the slowness at all?
For not using .Net I can understand the his detailed reasons, Java because it's a grumpy old man, Haskell because it's a paradigm shift etc...
Surely you jest?
The Pascal _syntax_ was designed by Niklaus Wirth.
> It is thanks to Anders' expert guidance that .NET started out such a remarkably well designed language
.NET is not a language.
the semantics of a language are equally (if not more) important.
you also need to recognise the importance of a good compiler, one which gives good error messages and optimises your code.
It may as well be. VB.net and C# are the only .NET languages that have any traction, and the differences between them are almost entirely superficial. Off the top of my head, the only significant difference is that VB.net supports inline XML.
* C#, and specifically microsoft implementation of it is absolutely horrible. The AOT part is ok, but the JIT is incredibly dumb. There are good reasons why it is the way it is, but it's ridiculously slow compared to Java (and yes, you're legally obliged not to do this comparison)
* MRIs Ruby GC collector until 2.0 had bugs which prevented it from having good performance, even asymptotically. To be honest, CPython had it until 2.6 too. That means that if you allocate objects rapidly you can end up in a O(n2) situation where each n allocated objects end up taking more and more time.
* Ruby and MRI in particular is nowhere near good performance. But you can throw more hardware on the problem always.
* I would like to see some data about "StackOverflow is fast because it's on .NET", it definitely does not fit with my view of how fast/slow libraries/VMs perform.
To be honest, language speed often does not matter. Java has pretty decent VMs, like hotspot and yet a lot of Java code is horribly slow, because libraries are badly written (think eclipse).
Also I'm personally terrified with ruby's security stories recently (and yes, it's both ruby and rails at fault)
The AOT part is exactly C# -> IL and then it's later compiled to assembler.
All the "my language is better than yours!" bashing is a result of being stubbornly opinionated and not willing to look at things from another perspective. There are always things that one VM will shine with where another will fall flat at, at vice versa.
Also, I don't think Ruby is nearly as bad as most people think. It's not as monolithically slow and vulnerable to exploitation as some people on HN claim. The VM is decent, and there are ways to tune the performance up that make it even "good". See, there's a tradeoff. The language is, IMO, fantastic, but you're going to take a performance hit for that that you need to deal with in some way or another. You're trading execution speed for "developer happiness", whatever that means anymore.
Okay I get the issues with licensing for .NET but in terms of functionality, most languages and frameworks that developers are using are stunningly good. We're lucky so have so many and most of this stuff doesn't cost a penny.
I think people should get less caught up in what tools they are using and focus on making a decent application. A great application could be made from any language mentioned here and so can bad application.
I like the comment about Ruby not being cool now. Too many developers get caught up chasing the latest language and framework, continuously climbing the learning curve of the latest offering.
I did some searching around and found these classes:
https://www.udacity.com/course/cs253 http://www.codeschool.com/paths/ruby http://ureddit.com/class/40250/web-programming-with-ruby-on-...
My goal is to learn web development, preferably Ruby but I'll make an exception for the Udacity course because I like Udacity.
Of the above courses, which one would you recommend and why? Or is there a better one? I am a C# and ASP.NET developer.
You know, it's great to believe in what you build and all, but being modest sometimes would be nice.
He qualified it pretty well. It could have been:
> Discourse represents the future of software.
Wouldn't that have been more arrogant?
The debugger is hard to beat (as Jeff mentions). C# has kept up with most features (LINQ, dynamic, async/await, etc) that are available in Ruby, and the CLR is quite fast. The core libs are also very solid. ASP.NET MVC is very comparable to Rails.
There are a bunch of downsides as well, but they are well-covered by OP.
> what am I missing out on? I'm not really sure what you know but the answer may be nothing. I have been playing around with code contracts and expression trees a lot recently, I think that stuff is neat. The thing is though that most other languages & frameworks have this stuff too.
The argument that keeps being throwing up is that It is fast enough for most ( actually only for Rails related ) things and is mostly limited by SQL, but that is like saying my Toyota Prius is fast enough since the high way speed is limited anyway.
I meant most of the complain aren't really about Ruby getting LuaJit speed ( is that even possible? ) or JS V8 engine. Just at least it is on par with Python ( not talking about PyPy either )
Last year I gave Ruby a try (for an ambitious project) and I have to say that it felt like going back in time to my C++ days. The syntax is very, very different and the environment support (command line + sublime) is clearly not something that I have done in the past 10 years.
I like the flexibility of it but coming from statically typed languages I find myself trying to replicate the same way of thinking in Ruby. Which in turn is making me less productive. Given the mental blockage and fear of productivity loss I am not certain I can push through to get to the point of productivity with RoR.
I am giving Python a try next! I would also appreciate any pointers to get me up to speed w/ Python frameworks for web development.
PS: The rails part is just fine, I have developed an Active Record based framework to do web development on C# in 2003. So I am more specifically talking about Ruby the language.
So why not Node.js? Presumably it's down to maturity.
Ruby isn't cool any more. Yeah, you heard me. It's not cool to write Ruby code any more. All the cool people moved on to slinging Scala and Node.js years ago. Our project isn't cool, it's just a bunch of boring old Ruby code. Personally, I'm thrilled that Ruby is now mature enough that the community no longer needs to bother with the pretense of being the coolest kid on the block. That means the rest of us who just like to Get Shit Done can roll up our sleeves and focus on the mission of building stuff with our peers rather than frantically running around trying to suss out the next shiny thing.
(edit: formatting)
"Hurr I said it's old school, so I use it. Now node.js is cool, so we can do our thang and no kiddies getting in the way"
I mean, wth?!
This whole post could be written with ruby changed to python and node.js changed to go or something.
Seems like there is no "real" reason to use ruby at all, he just likes it but can't simply admit it...
As he also noted:
There's always more than one way to do it, and just because I chose one particular way doesn't make it the right way – or even a particularly good way.
I guess you've other metrics to decide what tools to use, and that's great :)
Wow, that claim could really do with some qualifying.
We all know CPU performance is much less important than IO performance (file, DB, network), but assuming a large Ruby site and large .NET site both got that part right, and CPU performance does start to matter, what he says sounds reasonable.
Rather than being noticeably faster (lower latency) for a single user, the compiled tier (Java,C#,Go,Haskell,Scala,etc)'s better performance often just allows for far fewer (or cheaper) servers than the interpreted tier (PHP,Perl,Ruby,Python) to be thrown at the problem.
"Fast" in the context of the Internet is incredibly subjective (especially when you factor in global network latency), and has no place in technical discussion unless backed up with benchmarks (and even then, to be taken with a pinch of salt). For example, think about these made-up statements:
1. "Our site is really fast."
2. "That site is faster than the other site."
3. "We made our site 10% faster."
4. "We build our site using language X because it's fast."
I'm sorry, but statements like that raise my bullshit firewall. It's bordering on marketing speak.
As someone who starts his first Ruby gig on Monday, this puts a smile on my face.
Ruby is hardly efficient and with better(and efficient) alternatives out there I wonder why do people still flock to Ruby/Rails.
What is that editor in the screenshot?
> Anders is the only one of them who built Turbo Pascal and Delphi
http://prog21.dadgum.com/116.html http://williamedwardscoder.tumblr.com/post/32659364988/turbo...
Since I'm leaving links to my blog, here's another relevant one: http://williamedwardscoder.tumblr.com/post/43394068341/rubys...
The IDE was also quite good for the time.
It was my favorite programming language until I was forced into C and C++ land.
Nowadays I am just another polyglot developer, but the Pascal family of languages has a special place on my heart.
I think the software would be safer would one language of that family be the default systems language for mainstream operating systems.
And a great built-in debugger. And Borland Pascal 7 even had protected mode support. I still get nostalgic when I see screenshots of Turbo Pascal.
I think the software would be safer would one language of that family be the default systems language for mainstream operating systems.
Indeed, there were better languages in the Pascal family (e.g. Modula-2 and Oberon), but they gained much traction. I did write some OS/2 programs with the Canterbury Modula-2 compiler.
A nice experience that it is possible to have desktop operating systems written in GC enabled system programming languages, contrary to what many people think.
Sadly not well known outside the Zurique's Technical University (ETHZ) or the institutes that work with them.
I liked in the experience back in the mid-nineties and I am a bit of Oberon collector.
What you need to do is make a decent 'unwrapping' video and then talk about how the object system worked e.g. widgets.
That'd get some attention here.
If there was no open-source alternative companies like MS could have continued for ever and ever with ever more convoluted licensing terms and people wouldn't have had the choice...
PG needs to put in a filter over there, just like he deleted Adria's firing posts yesterday. Though the contexts are different.
>>that .NET started out such a remarkably well designed language – literally what Java should have been on every conceivable level
I am glad Java didn't turn out to be that way.
>>Argentina, or Nepal, or Bulgaria
Why has he mentioned all of them in one line/context? I don't see them at a similar level either in education, wealth/poverty or so.
As an aside, I'm not quite sure why I'm being down-voted since I meant the original comment as a compliment. Shutting down the package site and quickly cleaning up the vulnerabilities are (IMHO) a sign of a more mature platform. I guess the first rule about Ruby is that you can't talk about Ruby (unless you're one of the chosen few).