News for hackers. Stuff that matters.
Re:Pinterest Architecture Update - 18M Visitors, 10x Growth,... by irahul on Tuesday May 22, 2012 @01:23PM (#4008812)
> Expressive lies in the language not in the framework,

For me, expressiveness is the sum of language expressiveness, framework, culture and api design.

For example, see this crime against humanity

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    
    <c:choose>
        <c:when test="${emails.unread != null && fn:size(emails.unread)}">
            You have ${fn:size(emails.unread)} unread email(s)!
        </c:when>
        <c:otherwise>
            You have no unread emails!
        </c:otherwise>
    </c:choose>
Now, the designers could have very well implemented:

    You have ${emails.unread ?: 'no'} ${emails.unread?.pluralize('email')} !

> I think you have a different mindset on that one but I'm not sure what you're trying to achieve.

I am not trying to achieve anything, and it's not just a matter of mindset. See my example above. Expressiveness isn't just something which is confined to the language. Horrendous apis and frameworks are a bane for any language.

> Migration? Flyway works nicely and I don't have to spend days to set it up, just less than an hour for multi-year project.

I don't follow your remark that you don't have to spend days to set it up. Which migration lib takes days to set up? I am not contesting there isn't something bad out there(see my JSP example above), but since we are talking Rails/Django, I don't see how it is relevant here.

> JAX-RS can spits both XML and JSON easily with no code changes. I don't have to use Sinatra (or node.js) for web-api and deploy it separately from Rails:

Umm what? Rails needs Sinatra to produce JSON?

    def foo
      respond_to do |format|
        format.html {  }
        format.json {  }
        format.xml { }
      end
    end
> Wait, what am I doing trolling like redditors or slashdotters over mindless debate. > sigh technology has never been the problem, the people are sigh always holds true.

I won't bother responding to this.

Re:Pinterest Architecture Update - 18M Visitors, 10x Growth,... by edwinnathaniel on Tuesday May 22, 2012 @02:18PM (#4009083)
http://freemarker.sourceforge.net/ and ditch JSP or use pure JS+HTML.

A typical setup is to use Rails for front-facing website and Sinatra for web-services (RESTful).

What I'm saying is that that can be done with Spring MVC + JAX-RS:

@Produces("application/xml")

@Produces("application/json")

// Want more? add your own? very flexible

// @Produces("application/atom")

// @Produces("text/plain")

// @Produces("application/something+xml") <-- custom

public Employee get(@Parameter("id") final int id){

  // code no need to pepper with respond_to

}
Re:Pinterest Architecture Update - 18M Visitors, 10x Growth,... by irahul on Tuesday May 22, 2012 @02:57PM (#4009308)
> http://freemarker.sourceforge.net/  and ditch JSP or use pure JS+HTML.

You said frameworks don't decide expressiveness. I was quoting an example that they do. Whether you use jsp or not is tangential. Java isn't anywhere near python or ruby in terms of expressiveness, neither are the frameworks.

EDIT: Like another commenter pointed out, if you can get a 55k LSoC Java project down to 8k Python project, that says something about expressiveness.