wanderingmarker
wanderingmarker on Hacker News
Today, I'm looking at C++11 and using Clang, and I like what I see. Vastly improved compiler error messages, lambdas, very decent type inference, standardized smart pointers, good standard library (and Boost is always an option). I haven't tried heavy-duty debugging yet, but I suspect it still sucks. Overall — I'll probably be using C++ quite a bit more in the future. It is no longer the nasty pile of kludges on top of C which it used to be ten years ago.
Others on this thread have pointed out that the Alioth benchmark takes startup time into account. Yes, this imposes a startup penalty on Clojure.
More importantly, the implementations of each individual benchmark vary significantly in performance quality. High-performance Clojure requires a couple of tricks in type hinting, using unchecked arithmetic, and preferring native Java arrays.
I looked at a couple of the benchmarks, and the mandelbrot example uses those tricks. Notice the performance there: http://shootout.alioth.debian.org/u64/performance.php?test=m...
Notice that Java 7 and gcc run at about the same speed, and Clojure is only about 2.2x slower (than C). Scala is about 1.9x slower (than C). gcc is about 1.5x slower than Intel Fortran.
To make the benchmark more fair: (1) all timings should disregard startup time; and (2) all JVM languages should have the opportunity to run the benchmark a few thousand times before timing it. Otherwise, it measures JVM startup time, and then it measures how long it takes the JIT to achieve maximum optimization. By comparison, the C and Fortran code runs at full speed almost out of the gate.
All-in-all, considering that Clojure is an extremely high-level language I consider its performance impressive [1]. Yes, the inner loops need to be coded in a slightly un-idiomatic manner, but you can do all this in the comfort of your REPL, which makes the process of making optimizations reasonably painless.
[1] Don't forget to scroll down the mandelbrot results and look at the stellar performance of other popular high-level languages.
Setting up Linux teaches system administration skills. Useful, but nothing to do with programming. Learning Emacs is fantastic (I'm a huge fan), but again — nothing to do with programming. For that matter, writing a blog engine should not be someone's first exposure to programming. Frameworks and web development should be simply banned for people who haven't yet written a Fibonacci sequence generator. Please don't waste your time learning how to integrate other people's services and APIs. You aren't ready for this yet.
Don't think about tools, think about concepts. Learn about how programs flow. Learn about data structures, the basics of algorithms, and recursion. Understand how and why programs are structured the way they are. This stuff isn't hard, and won't take more than a few weeks to learn. Then you should look around at tools and at the kinds of problems you want to solve. In the meanwhile, you'll only slow yourself down if you try to run (e.g., figure out why web frameworks work the way they work) before you can walk (e.g., understand functions).
First of all, cafes are plentiful. All he could come up with is the Tea Lounge in Park Slope? There are dozens of small, non-corporate coffee shops in the Village, dozens more in Williamsburg. And that's just the two neighborhoods where I usually spend time.
Second, New Yorkers don't cook? I think the author spent too much time with the wrong crowd. Plenty of people shop at green markets, including the huge one at Union Square precisely because they like local produce and like to use it.