via HNTweets
Google’s Go and implicit interface declaration … Comments: https://news.ycombinator.com/item?id=5773810
Showing posts with label languages. Show all posts
Showing posts with label languages. Show all posts
Monday, May 27, 2013
Tuesday, July 10, 2012
Why is Clojure so slow?
RT @newsycombinator
From Martin's Computer Programming Blog.
What we can see it that Java itself accounts for 0.35s of the startup time, but unfortunately Clojure adds another second(!) on top of that. This 1.3s pause before main gets called is why Clojure is unsuitable for "terminal scripts". The running time of any scripts (like lein or starting the REPL) will be totally dominated by the startup time. Most Clojure developers will not notice this too much to, since they spend almost all their time in the REPL itself, but users of those Clojure programs will!
My summary is that it spends 95% of the startup-time loading the clojure.core namespace (the clojure.lang.RT class in particular) and filling out all the metadata/docstrings etc for the methods. This process stresses the GC quite a bit, some 130k objects are allocated and 90k free-d during multiple invokes of the GC (3-6 times), the building up of meta data is one big source of this massive object churn.
Saturday, April 28, 2012
Thursday, April 26, 2012
A Forgotten Principle of Compiler Design
from Programming in the 21st Century.
That a clean system for separately compiled modules appeared in Modula-2, a programming language designed by Niklaus Wirth in 1978, but not in the 2011 C++ standard…hmmm, no further comment needed. But the successor to Modula-2, Oberon, is even more interesting.
Wednesday, March 07, 2012
Monday, May 02, 2011
Saturday, April 23, 2011
Can Your Programming Language Do This?
An excellent argument for functional programming from Joel Spolsky.
I take exception in a couple of ways. One is that, for some of the example code, it might actually become harder to read/understand as you go further into the article. I don't think anyone would have trouble understanding the earlier versions.
Second, it's true that having map-reduce be natural to the language and, more importantly, the programming style may lend to thinking in those terms. However, I don't think that's necessary to think of using map reduce as a solution for large scale computing. It's possible to understand the concept without it being natural in the language. (I explain it regularly in non-FP terms).
I take exception in a couple of ways. One is that, for some of the example code, it might actually become harder to read/understand as you go further into the article. I don't think anyone would have trouble understanding the earlier versions.
Second, it's true that having map-reduce be natural to the language and, more importantly, the programming style may lend to thinking in those terms. However, I don't think that's necessary to think of using map reduce as a solution for large scale computing. It's possible to understand the concept without it being natural in the language. (I explain it regularly in non-FP terms).
Thursday, December 18, 2008
A-Z of Programming Languages
Techworld has been featuring a series of interviews with the creators of various programming langauges. It's hard to find a “home page” for the series but here's the most recent page, I think.
The interviews aren't excellent and are repetitive at times, they are probably done by email, but still interesting reads particularly when you place the various authors' responses side by side. Warning, the Stroustrup interview is interesting but almost unbearably long. It's not really that long but it seems that way sometimes.
Thursday, December 11, 2008
Which Programming Paradigm
Once again this age old question comes up on Slashdot with a focus on the question of which paradigm should be learned, imperative, OOP, or functional. The usual discussions of various languages ensues.
There was also this discussion of programming languages (“for Linux”).
Here's a book! In one of the posts, this book (which is said to be used for the introductory programming class at MIT) is linked to: Structure and Interpretation of Computer Programs by Albelson, Sussman and Sussman, MIT Press, 1996. The entire text is on-line.
My Humble Opinion
Oh, you want to know what I think?
I think the order should be:
- Imperative language
- OOP
- I'm not even sure about functional yet, but it should probably be learned at some point.
I would add the principles of structured programming into the process of learning procedural programming using the imperative language.
What language do I currently think should be taught as a first programming language?
What order did I learn in?
Please note this caveat: I'm not suggesting this as an order that should be followed now. The years over which I learned these languages span from the mid 1970s to the present and this order is strongly linked to the history of the development of programming and languages.
Focusing on mainly the languages that mattered somehow, and skipping those that I dabbled in some.
- FORTRAN
- BASIC (almost immediately after)
- Pascal (structured programming)
- Modula-2 (modules!)
- C (and the world of UNIX)
- Objective-C (my first OOPL)
- Perl (more real work than in any other language)
- Smalltalk (OO purity)
- Python (The same slot as Perl)
I learned BASIC on the CDC Cyber mainframe computer and in later years used it on micro computers. (Remember when they were called micro computers? Hah. I wonder when that term went out of use? Probably around the time the so-called micros became more powerful than the mainframes&hellip).
What about LISP? Well, I learned it around the same time that I learned Pascal, but never did a whole that was useful with it.
Thursday, October 25, 2007
ONLamp.com -- An Introduction to Erlang
One of my colleagues at work did a tech talk on Erlang recently which is an interesting language. Here's a nice introduction at On Lamp.
ONLamp.com -- An Introduction to Erlang
ONLamp.com -- An Introduction to Erlang
Subscribe to:
Posts (Atom)