108 karma · joined September 19, 2011
1. copyable objects like
class RGB { int r, g, b };
2. big complex things that should never copy but can move class Foo { Foo(const Foo&) = delete; };
In case of (1), I don't care if move or copy constructors are used and I am happy that the compiler will decide. In case of (2), if by accident I invoke a copy constructor, I end up getting a compile-time error.I am a full-stack software developer and a data scientist. I have a background in applied statistics, mathematics, physics and quantitative finance. I have written production systems dealing with big data, analytics, prediction and interactive visualization.
I have extensive experience with C++, Java, Python (Twisted, Cython), Javascript (including Node): high-performance back-end as well as dynamic front-end services.
Please contact me for references and additional information.
My site: http://kpartite.com
My LinkedIn: https://www.linkedin.com/in/maksimsipos
What I am saying is that I don't like the costs of investing into a whole another ecosystem (say Scala or Clojure), with an unproven future, and a smaller market (compared to pure Java). Of course, you can call any JAR from Scala and Clojure, but it seems to me that a Scala/Clojure JARs are not equally callable from Java (or other JVM languages). You start getting into runtime JARs and the basic "impedance-mismatch" of different language abstractions. (For example, for languages with traits, what do those correspond to in Java -- interfaces, abstract classes?)
Ideally, I would like to have a language that can compile a Java class that seamlessly interacts with other Java stuff. The problem is that it seems to me you don't get any of the benefits of Scala, Clojure, in that setup, because the runtime adds a lot of value. Most that you could get are nice syntax for lambdas (which are a bit verbose in Java, but not really a problem for me), but those are anyways coming in JDK 8.
Have people on HN thought about this? People who use alt JVM languages, I am curious about your opinions. Honest question, I am not interested in language flamewars.
I find that I am generally faster in development (at least with new libraries) in Java, than I used to be in Ruby and Python. This is all thanks to the "discovery" ability of IDEs. (I admittedly never tried a Python or Ruby IDE.)
And I have the same feeling regarding refactoring. It is not merely limited to renaming a method. I find myself very often making major structural changes to my code. Moving packages around, introducing interfaces, changing type signatures. In this regard working with an IDE makes me feel like a "software architect", I get a big-picture of the project in a much faster and better way than I used to with purely a text editor.
I also feel I waste no time on boiler-plate code (which admittedly Java has a lot of). In Netbeans (I am sure it's the same in Eclipse and IDEA) the code generation abilities are terrific. For instance, I can just write "class C implements Interface", press Alt+Enter+Enter and see all interface methods written out and ready for me to fill in the implementation.
Regarding the REPL: I've found that with strict typing, I just end up knocking out the code that _I think_ should work, and then I test if it works. I can sometimes type for 200-300 lines without running the code, then test it and see that it actually works. Of course, sometimes it fails too: luckily Java debugging is easy and incredibly capable.
However, if you really want a Java REPL, you can have something a little bit similar with BeanShell (you can even embed it into NetBeans).
I bought it for $650 from Amazon almost a year ago. It is not really an Ultrabook. But, I think it is perfect. The screen size is a 13", it is incredibly light, yet still has a full-size keyboard, all ports you will ever need, and quite A LOT of power (4Gb RAM expandable to 8Gb, 2 cores, 4 hardware threads). I use Ubuntu with Unity, with a lot of browser windows, a heavyweight IDE (NetBeans), lots of terminal windows and it works very snappy. It also never gets hot. The battery life is terrific.. 7-8 hours!
I didn't buy an SSD yet, but I intend to, in a few years when they get cheaper.
I dual boot Windows for gaming, and I've even played some relatively recent video games (like Just Cause 2, Mass Effect 3), with maxed-out resolution on an external monitor. Works like a charm.
See the birthday problem: http://en.wikipedia.org/wiki/Birthday_problem
Many times I've had occasions where the paper doesn't clearly explain parameter values, order of updates in the simulation, etc.
A tip I've discovered: you may have a chance to get access to the source code if you email the corresponding author (if they're still alive!).
There are many more interesting real-life programs tested on computer language shootout website.
In particular, you can't compare C and JVM performance on programs that run for such a short time. The JVM time will be dominated by the time to start up the the JVM and to do the first JIT optimization. I think it is very likely that for a larger fibonnaci number, the JVM performance will come asymptotically close to optimized C's.