News for hackers. Stuff that matters.
Re:Why Ruby? by RyanZAG on Friday March 22, 2013 @04:57AM (#5421950)
Curious as to why Java didn't feature in the choices - considering just how similar Java is to .Net yet having none of the licensing issues and a huge (the biggest?) set of freely available high quality libraries...
Re:Why Ruby? by derefr on Friday March 22, 2013 @05:04AM (#5421958)
> If you want to build truly viable open source software, you need people to contribute to your project[...]

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 ;)

Re:Why Ruby? by danieldk on Friday March 22, 2013 @06:18AM (#5422132)
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.

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!)

Re:Why Ruby? by prawks on Friday March 22, 2013 @09:42AM (#5422804)
> you'll be able to get it past management and still enjoy some of the functional programming fun.

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".

Re:Why Ruby? by danieldk on Friday March 22, 2013 @11:05AM (#5423347)
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).

Re:Why Ruby? by prawks on Friday March 22, 2013 @11:29AM (#5423532)
I'm glad to hear otherwise! I have a few friends that are Java nuts, so I'm glad they're not as nutty as I thought!
Re:Why Ruby? by woobar on Friday March 22, 2013 @11:24AM (#5423493)
> 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

Check out this slides: http://www.slideshare.net/blackducksoftware/open-source-by-t...

Re:Why Ruby? by prawks on Friday March 22, 2013 @02:24PM (#5424660)
Like I mentioned, I know Java the language is active, but how much of that is server-side Java vs. Android (which I guess is a massive contributor).
Re:Why Ruby? by danieldk on Friday March 22, 2013 @03:19PM (#5425014)
Some examples of Java-based non-Android open source projects that are very widely used:

http://www.jboss.org/projects http://projects.apache.org/indexes/quick.html

Re:Why Ruby? by jmcqk6 on Friday March 22, 2013 @04:08PM (#5425336)
Oh, am I missing something or is this just basically Java finally getting LINQ?
Re:Why Ruby? by moondowner on Friday March 22, 2013 @05:37AM (#5422019)
Java is at the 3rd place on GitHub on Top Languages (sharing it with Python), which proves that there's collaboration going on in Java projects https://github.com/languages
Re:Why Ruby? by tszming on Friday March 22, 2013 @05:52AM (#5422060)
A lot of Java projects on Github are Android related.

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.

Re:Why Ruby? by moondowner on Friday March 22, 2013 @06:41AM (#5422182)
There are also non-Android related Java projects there, for example from the guys from Netflix, SpringSource, LinkedIn, Twitter, etc... but I think that you're right, a lot of Java projects are Android related.
Re:Why Ruby? by tszming on Friday March 22, 2013 @10:54PM (#5427080)
An interesting phenomenon is a lot of Java projects on Github if they are not Android related, very likely they are from big guys like Twitter, Netflix, LinkedIn, Yammer etc. Definitely they all have the reasons (e.g. performance, static typing) to use Java or JVM technologies, but if you count the number of projects from indie developers, Ruby, JavaScript & Python are much popular - and they are the target audience of Discourse.

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.

Re:Why Ruby? by bradleyjg on Friday March 22, 2013 @12:43PM (#5424019)
So, your answer is that java isn't cool enough? Did you see the part of the essay where he wrote that he wasn't looking for the cool kids flavor of the month?
Re:Why Ruby? by jiggy2011 on Friday March 22, 2013 @05:06AM (#5421963)
The problem is choosing a framework for Java. Most of them are just big , unwieldy and force overwrought abstractions and 1000+ line XML files on you.

The big exception is Play! Framework but that seems to have mainly shifted over to the Scala side of things.

Re:Why Ruby? by bad_user on Friday March 22, 2013 @06:55AM (#5422217)
> The big exception is Play! Framework but that seems to have mainly shifted over to the Scala side of things.

Dude, Play 2.x is perfectly fine for Java and will always support both languages.

Re:Why Ruby? by jiggy2011 on Friday March 22, 2013 @07:07AM (#5422254)
True, but it's clear that Scala is the preferred language.
Re:Why Ruby? by bad_user on Friday March 22, 2013 @07:17AM (#5422279)
I view that as a good thing, as cool concepts like Iteratees have been inspired by functional programming and Scala. There aren't many frameworks out there that make it easy to develop traditional websites and web services and do comet/websockets with ease. There aren't many reactive frameworks out there, period.

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.

Re:Why Ruby? by vorg on Friday March 22, 2013 @08:24AM (#5422493)
> Groovy may have gotten better in the meantime, I don't really know

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...

Re:Why Ruby? by RyanZAG on Friday March 22, 2013 @05:30AM (#5422008)
Java has moved from XML files to @Annotations now. Most frameworks are providing support for it now, too.
Re:Why Ruby? by lazyjones on Friday March 22, 2013 @05:43AM (#5422040)
You mean they have added @Annotations to XML file editing. Many frameworks still require you to edit XML files too in some places (Maven/Ant/Tomcat config etc.).
Re:Why Ruby? by moondowner on Friday March 22, 2013 @06:48AM (#5422198)
In the application code, you can use either annotations or XML, or both, it's up to the developer.

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.

Re:Why Ruby? by cgh on Friday March 22, 2013 @11:17AM (#5423445)
If you are doing much beyond simple bean injection - Camel, Quartz, OSGi, etc. - then you will be up to your armpits in XML. But it's not so bad, if you prefer configuration to convention.
Re:Why Ruby? by moondowner on Friday March 22, 2013 @05:29AM (#5422006)
And don't forget Spring MVC, my favorite choice. Since Spring 3 it supports complete annotation based configuration. And it's completely configurable to leave you choose whichever templating solution (e.g. Thymeleaf)
Re:Why Ruby? by pmahoney on Friday March 22, 2013 @09:56AM (#5422887)
I have found RESTEasy (and likely any JAX-RS implementation) to be very nice for creating simple services. With various annotations and static typing to automatically convert various parameters into function arguments, it's easier than Sinatra on Ruby. (Of course, there's a bit of config overhead to hook it into a web.xml, but it's not terrible)
Re:Why Ruby? by thebear on Friday March 22, 2013 @06:35AM (#5422171)
I've heard great things about Play. When I had to choose a Java framework about 2 years ago, I chose Stripes, and I've been very happy with it. But I notice that it doesn't even get mentioned in discussions like this one. Wonder why that is.
Re:Why Ruby? by RyanZAG on Friday March 22, 2013 @10:35AM (#5423139)
One of the biggest (maybe the biggest?) contributions to language and framework adoption is marketing in the form of blog posts, training sessions and quality tutorials. This is why RoR is so popular even when it isn't all that great (there are many technically superior alternatives across many languages) - it has amazingly good marketing for a framework.

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.

Re:Why Ruby? by oinkgrr on Friday March 22, 2013 @07:52AM (#5422388)
I dabbled in Stripes a while back(moved job, now on Spring3), and I liked it as well. Lightweight and easy to use but lacked decent support and user traction. No reason it's not used more, and I don't know why either.
Re:Why Ruby? by khein11 on Friday March 22, 2013 @06:53AM (#5422211)
Play is a great framework, a breath of fresh air for Java community!
Re:Why Ruby? by Proleps on Friday March 22, 2013 @12:35PM (#5423973)
Spark is a micro framework for Java[1]. I plan on trying it some time in the future.

[1] http://www.sparkjava.com/why.html

Re:Why Ruby? by mbell on Friday March 22, 2013 @02:25PM (#5424666)
Ug...that is some ugly code. I can't believe they are arguing that this (Spark):

    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...
Re:Why Ruby? by matt_s on Friday March 22, 2013 @09:37AM (#5422771)
I'm also curious where Java lands as far as running JRuby on a JVM performance wise. Granted you would need people familiar with running JVM's, which may not be the case with folks that are Rubyists. But it's not like there aren't many choices when it comes to server-side JVM.
Re:Why Ruby? by bibinou on Friday March 22, 2013 @06:35AM (#5422169)
TFA :

> 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

Re:Why Ruby? by trailfox on Friday March 22, 2013 @07:33AM (#5422318)
Except that .NET is not a language... The language Anders invented is called C# and v1.0 looked extremely similar to Java (later versions diverged significantly from Java).
Re:Why Ruby? by njr123 on Friday March 22, 2013 @07:47AM (#5422369)
Java and .net/c# are not really that similar any more. Just to pick one example, Java doesn't have an equivalent of LINQ
Re:Why Ruby? by alberich on Friday March 22, 2013 @01:26PM (#5424278)