News for hackers. Stuff that matters.
Re:Groovy 2.2 released by pron on Monday November 18, 2013 @06:54PM (#6758198)
I can understand why in some circumstances the JVM is not the most appropriate choice, but to me, the sentence "Its only downside... the JVM", sounds like "The car's only downside... it's a Ferarri". I've worked with so many runtimes in my career but have yet to see one fit to kiss the JVM's feet. It's far from being the simplest, but in terms of sheer power (runtime instrumentation, runtime linking, performance monitoring, hardware/OS support and more) nothing else comes even remotely close.
Re:Groovy 2.2 released by sdesol on Monday November 18, 2013 @07:42PM (#6758408)
I can't emphasize how easy it is to extract JVM runtime information and how useful that information is for performance tuning. Sure the JVM uses a bigger initial footprint when compared to a natively compiled application, but the ability to see how it's working is invaluable.

My program is RAM hungry...ish, but with its easily accessible garbage collection (GC) information, I can really get the most out of a 512MB VPS. Just have the GC logs written to RAM disk and have it rotate and you'll be amazed at what kind of useful stats you can generate.

You can see how I'm using it here:

http://screenshots.gitsense.com/jvm-monitoring.html

The 10 minute ratio stat lets me know how much time was spent doing garbage collection within the last 10 minutes.

Re:Groovy 2.2 released by pron on Monday November 18, 2013 @07:46PM (#6758433)
... and VisualVM, and Flight Recorder + Java Mission Control, and BTrace/Byteman... the list goes on and on. If you need to, you can print out the assembly code generated by the JIT at runtime, modify your code on the fly, and see how the assembly changes. Erlang's BEAM VM has some of these capabilities, but not the JVM's performance. Other runtimes are decades behind.
Re:Groovy 2.2 released by pjmlp on Tuesday November 19, 2013 @01:43AM (#6759645)
> Other runtimes are decades behind.

To be fair, .NET also offers a similar level of support.

The only difference is that you have to pay for it, by getting Visual Studio Premium or third party tooling like dotTrace which plug into the CLR monitoring API.

For many people, the fact that they get such tools without paying a dime is a selling point for the JVM vs .NET.

Re:Groovy 2.2 released by pron on Tuesday November 19, 2013 @03:36AM (#6759919)
Yes, .NET is excellent, too. But it's Windows only.
Re:Groovy 2.2 released by pjmlp on Tuesday November 19, 2013 @04:42AM (#6760146)
Many of us don't have a problem with it. :)

On my type of work, the tools are chosen by the customers, not me. So usually .NET in Windows only shops, JVM languages in heterogeneous shops, and a little sprinkle of C++ via JNI/Interop if really required.

Re:Groovy 2.2 released by hatchoo on Monday November 18, 2013 @10:05PM (#6758998)
I am curious, what type of app do you have running on the 512MB VPS? I use Java in my day job but I am considering using Python for a side project primarily because of a JVM-based app higher memory requirement.
Re:Groovy 2.2 released by sdesol on Monday November 18, 2013 @10:45PM (#6759145)
It's a software that I'll be releasing soon:

http://beta.gitsense.com/index-dev.html

Note the test drive feature isn't working yet. I'm hoping to have this working in a couple of days. The try it now feature should be working and for that I create a 512MB digital ocean VPS instance for each trial request.

It's important to note my software doesn't use any web framework ... other than what I have built myself. This is probably one of the reasons why my program has a smaller memory requirement.

Everything is pretty much one layer above the servlet/rest layer. And the only time my program becomes memory hungry is when I do the initial indexing but once that's done, 512MB is more than enough to keep it happy.

If you know Java, I would personally use it for your side project since python will be unable to match it performance wise.

Edit:

I also forgot to mention that my product uses 3 JVMs. One for the webserver, one for my worker process, and one for the indexer.

Re:Groovy 2.2 released by peterashford on Monday November 18, 2013 @08:02PM (#6758505)
This is HN. Trash talking anything Java related is image-enhancing amongst code fashionistas.
Re:Groovy 2.2 released by pixelmonkey on Monday November 18, 2013 @10:07PM (#6759005)
I use the JVM "as little as is absolutely necessary", which is often, thanks to technologies like Lucene, Hadoop, Storm, Zookeeper, etc.

And, "code fashionista"?

Hah, give me a break.

Python actually predates Java. I can't tell you how many times in the period 2005-2009 people derided me for using a "scripting" language for real work. All the "real programmers" used C++ or Java, of course!

Then, in 2009-2013, everyone suddenly realizes, oh, perhaps we don't need 200 classes per 1,000 lines of code and perhaps we don't need an IDE to that vomits boilerplate all day long and perhaps static types aren't such an important thing and perhaps generics are overrated and perhaps programmer time truly is much more expensive than machine time, ...

and, now I'm a "code fashionista" for still using Python for production projects, 6 years later? The "scripting" language that's so non-serious that it's used by thousands of production large-scale systems and scientists the world over?

Yes, that one -- the "fashionable" language. The one that isn't fussy and just gets work done.

Re:Groovy 2.2 released by pron on Tuesday November 19, 2013 @03:59AM (#6759997)
Python is a language, and isn't any more concise than Groovy or Clojure. Also, if the "stuff" you need to get "done" is process a million transactions per second on a concurrent database that runs on a 64-core machine then it's completely inadequate. In all those companies I mentioned, Java the language's competitor is C++, not Python, and that's pretty much the language you can compare Java to.

Also, "everyone" is just most people in web startups, which are a very small minority of software developers with very specific needs. They usually work in small teams, so languages designed to help with large project management are not a requirement, but a very fast turnaround is. So, sure, Python is better suited than Java if those are your requirements. This is still just a tangent to the JVM discussion.

Re:Groovy 2.2 released by pron on Monday November 18, 2013 @08:16PM (#6758566)
I don't think this is the case. After all, Twitter, LinkedIn, Netflix, Square, Foursquare and eBay are pretty much JVM-only shops, almost all of Facebook's important stuff runs on the JVM, as well as much of Google and Amazon. I don't think anyone honestly thinks the JVM is not very much in fashion.
Re:Groovy 2.2 released by sdesol on Monday November 18, 2013 @08:34PM (#6758642)
I like the JVM but I really don't think the general population of programmers would call it fashionable. I have a friend who never visits HN but has a distrust for it even though his exposure to it was decades ago. The hardware back then was just not ready for it and it probably left some lasting scars.

I find that Java and the JVM is just something that you don't talk about, which is why it's never going to be fashionable. Useful yes. Fashionable, I'm not sure.