Earlier quoted context omitted.
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.
I disagree with ORM, at least as a "need". Why go to the trouble of migrating to a much higher performance platform to just give most of that performance back?
Frameworks Round 6
121–130 of 135 posts
Re: Frameworks Round 6
#122An 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…
If the Computer Language Benchmark is any reference, 10 lines of Java ~= 8 lines of Scala : http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
And 10 lines of Scala ~= 6 lines of Ruby : http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?t...
There's a pretty dramatic performance drop noted going from Scala to Ruby though.
(or 10:8:5 Java:Scala:Ruby if you wish)
Re: Frameworks Round 6
#123Earlier quoted context omitted.
> Testing is, as far as I can tell, the reason that these problems don't come up. Testing is a cost. It is more code to write, more code to maintain. It gives no guarantees about correctness, even of the exact feature under test. Consider the 10 lines starting from https://github.com/yairchu/red-black-tree/blob/master/RedBla... They guarantee the correctness of the invariants of the Red Black Tree, and they easily re…
> Testing is a cost. It is more code to write, more code to maintain. I'm not saying you write tests to protect against NPEs. I'm saying that you write tests to ensure correctness of your code, and as a side-effect NPEs are flushed out of your code. This is my theory explaining why NPEs are not a timesink for me. > They guarantee the correctness of the invariants of the Red Black Tree, and they easily replace hundred…
You never know when you have enough coverage to rule out NPEs or any other bug. And to get confidence about lack of NPEs you want to have coverage of all lines involving dereferences, which means you need near 100% test coverage to have a reasonable level of confidence. With Haskell, I can be reasonably confident about my code with very little tests.
> but I'd wager that it wouldn't be as readable as the equivalent written as a test.
Generally types are far more concise and guarantee more than tests. I find 5 lines of types more readable than dozens or hundreds of lines of tests.
> That's exactly right. Languages with nulls, and mutable shared state are perfectly reasonable to use if programmers do the right thing by convention
I think Scala users will generally disagree with you. They'd prefer it if null was ruled out in the language itself. That said, Go convention is to use nulls, not shun them.
> I don't find myself writing much safer code when I go from JS to C++. ... Ruby to Scala ...
Your code is much safer simply by construction, so I am not sure what you mean here.
> You claim that a significantly smaller shift, removing nullability from a language would be a big deal for reliability. That doesn't seem likely to me
Hitting type errors at runtime, null dereference crashes in Java and "NoneType has no attribute `...`" in Python is pretty common IME.
I do think non-nullability aids reliability, but that having sum types, proper pattern matching and parametric polymorphism aids it even more. And Go lacks all of these.
Re: Frameworks Round 6
#124Earlier quoted context omitted.
I'm a little confused here. You realize that Go is also statically typed, right? I'm not sure where any debate about dynamic languages started. The points you make about static vs dynamic are valid, just not relavent at the moment. It's funny, too, how you talk about "implementing a red black tree" like it's an everyday occurrence. I'm guessing you are a teacher/researcher (in which case this entire discussion makes…
On the dynamic..static axis, Go is much closer to the dynamic side than to Haskell's side. I am not a teacher or researcher, I am a practicing programmer writing code that is used by critical systems as well as ambitious projects that will (hopefully) be used by many real people. A red black tree is just an example with invariants that everyone is likely to know, so it's a nice way to illustrate the point about the p…
We get it. You don't like Go. Some of us do, and would rather have a productive discussion about how to take advantage of it's features and avoid the traps rather than get into a pointless debate about a language that we are highly unlikely to ever use. (after this discussion, I certainly never will)
You are giving the Haskell community a bad image with this kind of behavior, and I kindly request that you not reply to any more of my comments with anything to do with Haskell.
Re: Frameworks Round 6
#125Disturbing results since I so frequently have used Sinatra for hosting REST APIs for customer projects. Rethink needed. For 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…
Hunches: it's either going through webrick or not running with RACK_ENV production
Re: Frameworks Round 6
#126Disturbing results since I so frequently have used Sinatra for hosting REST APIs for customer projects. Rethink needed. For 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…
Maybe benchmark it yourself? I think something is amiss, it should easily 'hello, world' at 2x higher rate than Rails. Poked around the setup a little a while back but nothing jumped out. Hunches: it's either going through webrick or not running with RACK_ENV production
https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
Re: Frameworks Round 6
#127Earlier quoted context omitted.
I'm a little confused here. You realize that Go is also statically typed, right? I'm not sure where any debate about dynamic languages started. The points you make about static vs dynamic are valid, just not relavent at the moment. It's funny, too, how you talk about "implementing a red black tree" like it's an everyday occurrence. I'm guessing you are a teacher/researcher (in which case this entire discussion makes…
On the dynamic..static axis, Go is much closer to the dynamic side than to Haskell's side. I am not a teacher or researcher, I am a practicing programmer writing code that is used by critical systems as well as ambitious projects that will (hopefully) be used by many real people. A red black tree is just an example with invariants that everyone is likely to know, so it's a nice way to illustrate the point about the p…
Re: Frameworks Round 6
#128Earlier quoted context omitted.
On the dynamic..static axis, Go is much closer to the dynamic side than to Haskell's side. I am not a teacher or researcher, I am a practicing programmer writing code that is used by critical systems as well as ambitious projects that will (hopefully) be used by many real people. A red black tree is just an example with invariants that everyone is likely to know, so it's a nice way to illustrate the point about the p…
This seems like a decent, helpful comment to me. Don't know why it received two vitriolic replies.
Re: Frameworks Round 6
#129i would really like to see how CFML engines (Railo, Adobe ColdFusion) and frameworks (FW/1, CFWheels, ColdBox) stack up in this comparison. FD: I contribute to CFWheels
We'd love to receive these test cases as pull requests if you have the time to contribute them. :) https://github.com/TechEmpower/FrameworkBenchmarks
Re: Frameworks Round 6
#130Earlier quoted context omitted.
> Testing is a cost. It is more code to write, more code to maintain. I'm not saying you write tests to protect against NPEs. I'm saying that you write tests to ensure correctness of your code, and as a side-effect NPEs are flushed out of your code. This is my theory explaining why NPEs are not a timesink for me. > They guarantee the correctness of the invariants of the Red Black Tree, and they easily replace hundred…
> I'm not saying you write tests to protect against NPEs. I'm saying that you write tests to ensure correctness of your code, and as a side-effect NPEs are flushed out of your code. This is my theory explaining why NPEs are not a timesink for me. You never know when you have enough coverage to rule out NPEs or any other bug. And to get confidence about lack of NPEs you want to have coverage of all lines involving der…
This is not true. In the example I spoke about above, if I take a CacheClient, and a ServiceXClient when my type is being constructed, assign them to local fields and then never modify that field again, then I don't need to exercise every dereference of these fields, just one. And again, I don't test that my code handles NPEs, I test that my code does what it is supposed to, and in the process of doing that, NPEs get flushed out.
> Generally types are far more concise and guarantee more than tests. I find 5 lines of types more readable than dozens or hundreds of lines of tests.
I think you are viewing this through red-black-tree colored glasses. Specifically, you believe that a lot of code has mathematical constraints the way that example did. To me, this is an extremely remote possibility. I think if you tried to encode even the smallest real-world example of this, say a service implementing a URL shortener, you would run into a wall.
> Your code is much safer simply by construction, so I am not sure what you mean here.
I should have said more reliable.
> I do think non-nullability aids reliability, but that having sum types, proper pattern matching and parametric polymorphism aids it even more. And Go lacks all of these.
Truly, it baffles me that people still harp on the reliability aspect. It is quite likely that every piece of software you use day-to-day is written in a language with nullability, without pattern matching, and no sum types. Most of that software probably doesn't even have memory-safety (gasp!). Probably every website you visit is in the same sorry state. I'm sorry, but your arguments would be far more convincing if the world written in these languages were a buggy, constantly crashing hell. It's not.