Earlier quoted context omitted.
What do you mean by "mental cost" here? Cost of initial learning? Then I agree... But learning a language is an O(1) cost that takes a few weeks to a few months. We program with the language for many years. I never said the Go runtime will crash, but your programs will, because of unsafe nullability, mutability in the concurrently shared state, and various other problems in Go. Better concurrency in Haskell: In addit…
I think you are vastly under-estimating the learning cost. We're talking about teams of developers, not a hobby project. A few months * multiple programmers adds up to man-years really quick. Go is much simpler. We deployed our first production (admittedly a fairly minor piece) Go service under a week after we made the decision to start using Go. PS: State is only shared when you make it so. Go concepts like channels…
Frameworks Round 6
91–100 of 135 posts
Re: Frameworks Round 6
#92Earlier quoted context omitted.
I disagree that Haskell is "clever". I think Haskell is "smart". Using "Maybe a" when you have a nullable value is smart, not "clever". It aids maintenance and readability, not hampers it. Using pattern matching is the same. Haskell builds on mathematicaly simplicity, which makes things hard to grasp at first. This may be mistaken for cleverness. Unless I'm misunderstanding you -- can you give an example of something…
I'm not a haskell expert (obviously), but the time it takes me to parse things like this is time I would rather spend reading 5-10x the number of lines and getting the meaning right away. let loeb x = fmap ($ loeb x) x in loeb [ (!!5), const 3, liftM2 (+) (!!0) (!!1), (*2) . (!!2), length, const 17] (btw, I have no idea what the hell this does. Something to do with spreadsheets, apparently. I found it on http://www.h…
With years of Haskell experience, I rarely encounter code that is hard for me to read. This is a good counter-example, and is not typical code.
I read 10 lines of Haskell code roughly as fast as I read 10 lines of Python code -- yet the 10 lines of Haskell code can pack much more useful information.
So Haskell is a great tool for more efficient communication between programmers, who can write shorter messages to each other to convey the same information.
Re: Frameworks Round 6
#93Earlier quoted context omitted.
I think you are vastly under-estimating the learning cost. We're talking about teams of developers, not a hobby project. A few months * multiple programmers adds up to man-years really quick. Go is much simpler. We deployed our first production (admittedly a fairly minor piece) Go service under a week after we made the decision to start using Go. PS: State is only shared when you make it so. Go concepts like channels…
If you have to pay the salaries of programmers for the next 3 years to develop some solution, and know that 10% of that time will be spent learning a new technology that will make them 20%-50% more effective for the remaining 90% of the time. Would you do it or avoid it, based on the large cost of 10% of these programmers' time?
Re: Frameworks Round 6
#94Earlier quoted context omitted.
> I never said the Go runtime will crash, but your programs will, because of unsafe nullability, mutability in the concurrently shared state, and various other problems in Go. Personally, these problems are not what are a time-sink for me. The problems that I spend a vast majority of my time on tend to fall into two categories. First, there are design problems. i.e. how do you model your data to be queryable, how do…
I think people tend to underestimate the amount of time they spend on problems, when those are uninteresting. A single null dereference error may be trivial to fix, but the overhead around fixing any bug may be costly. For example, you might need to deploy a whole new version, rerun test suites and have a bunch of meetings. Then after all of this, you might remember that the problem only costed you 10 minutes of fixi…
Re: Frameworks Round 6
#95Earlier quoted context omitted.
If you have to pay the salaries of programmers for the next 3 years to develop some solution, and know that 10% of that time will be spent learning a new technology that will make them 20%-50% more effective for the remaining 90% of the time. Would you do it or avoid it, based on the large cost of 10% of these programmers' time?
When I have another solution that will make them 30% more effective with only a 1% learning cost, yes!
Re: Frameworks Round 6
#96An honest confession from someone inspired by these comparisons. I've been following these benchmarks very closely right from round one and ever since I've been waiting to see my favorite framework, Ruby on Rails perform decently to some extent. I waited till the last round to see some improvements and while I DID see some marginal improvements, it wasn't as expected. This then provoked me to do some basic math. Imag…
I had similar ambitions, and I wanted to play with the top performers, so I started looking at the Java (gemini) ecosystem. And after an hour of surfing I remembered why I didn't follow through the last time I had this idea. The Java ecosystem is complex, I mean really complex. Here are some of the terms I came by that look like I should grasp before trying to make something: servlet (various versions), servlet conta…
What I'd like to see: Java should be renamed with every major version [1], in much the same way Ubuntu, OS X, and Android are named.
Re: Frameworks Round 6
#97Can anyone explain why the "gemini" framework with an ORM outperforms raw servlets/queries in almost all the cases? What kind of optimizations are done ?
A difference in these tests is that we have our own connection pool. Speed was not a main objective when we wrote it--it's so old that if my memory is correct, it predates the availability of the connection pool that now ships with the MySQL driver, which is what we've used in the Servlet tests. Nevertheless, my conjecture is that perhaps it's just a tad quicker at selecting an idle connection. Incidentally, for a while in an earlier round, the Go guys had an alternate test implementation that used a concurrent queue for connections and it performed fantastically. We've been toying with changing Gemini to do the same at some point.
For the benchmarks project, we classified ORMs as "raw" (no ORM), micro, or full. In Gemini, we have a micro ORM. The following are examples of its use in the test code [2]:
// Get all rows from Fortunes table.
final List fortunes = store.list(Fortune.class);
// Get a random World row.
worlds[i] = store.get(World.class, random.nextInt(DB_ROWS) + 1);
// Run a batch of updates from a List of entity objects.
store.putAll(Arrays.asList(worlds));
"Micro ORM" is loosely defined, but we've applied it to ORM options that offer some abstraction over plain old SQL, but aren't as comprehensive as the standard-bearers. For example, while we have a data structure that represents relationships, we do not have a higher-level query language that traverses relationships automatically nor any similar mechanism for easy relationship traversal. It turns out that across all of these frameworks, there are dozens of what we are calling Micro ORMs.Getting back to your question, the Gemini ORM does leverage a few tricks for performance such as ReflectASM for object creation and prepared statements for queries. But there isn't a whole lot of fancy work going on.
It's not glamorous, but the most important high-performance elements we make use of in Gemini are the JVM platform and Java's concurrent data structures. As demonstrated by the likes of Undertow (the web server component of JBoss WildFly), mind-boggling performance is available on the JVM.
[1] https://groups.google.com/d/msg/framework-benchmarks/p3PbUTg...
[2] https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
Re: Frameworks Round 6
#98For my own projects I use Clojure + Compojure and more recently added Node.js (often with Meteor) and was pleased to see that they benchmark well. One thing I especially like about Compojure with the Hiccup HTML generating library is that I see syntax errors immediately in the editor. I suppose that Scalatra with embedded HTML would provide the same benefit.
Re: Frameworks Round 6
#99Earlier quoted context omitted.
When I have another solution that will make them 30% more effective with only a 1% learning cost, yes!
I am claiming Haskell will be 20-50% more effective than Go, not than what they're doing now :-)
Re: Frameworks Round 6
#100Earlier quoted context omitted.
how about http://robfig.github.io/revel/ ? I just skimmed thru their manual and it seems quite promising
Revel is pretty great so far (I actually just made my first contribution yesterday!). Some important things it needs though: support for HTTPS, better DB support (some type of ORM, although gorp is sufficient for now), HTTP auth, and better template engine (currently uses the built-in Go "template" package which is meh). Those are the major things that come to my mind.