Ruby 2.1.1 is released and Ruby turns 21
ruby-lang.org
ruby-lang.org
1957 (57) Fortran
1958 (56) Lisp
1958 (56) ALGOL
1959 (55) COBOL
1964 (50) APL
1970 (44) Pascal
1970s Forth
1972 (42) C
1972 (42) Prolog
1972 (42) Smalltalk
1973 (41) ML
1975 (39) Scheme
1978 (36) TeX
1982 (32) PostScript
1983 (31) C++
1983 (31) Objective-C
1984 (30) Common Lisp
1986 (28) Erlang
1987 (27) Perl
1990 (24) Haskell
1991 (23) Python
1993 (21) Ruby (according to article)
1994 (20) ANSI Common Lisp
Mid 1990s Dylan
1995 (19) Java
1995 (19) Ruby (according to Wikipedia)
1995 (19) JavaScript
1996 (18) Ocaml
2000 (14) C#
2003 (11) Scala
2003 (11) Factor
2005 (9) F#
2007 (7) Clojure
2008 (6) Nimrod (according to speedydeletion.wikia.com)
2009 (5) CoffeeScript
2009 (5) Go
2012 (2) Rust
2012 (2) Julia
(edit: added Clojure, of course)
(edit 2: added ObjC, Dylan, Nimrod, Go, Rust, Julia)An easy answer to the question: "Why didn't they just steal that from Java?"
Java had green threads back then.
And this is _not_ a property of native vs. green threading. (And shows how shallow the comparison is, given the number of languages that implement green threads mapped to native threads nowadays.)
Also, I consider the standard library to be a part of the core language, because it is. Python doesn't have many concurrency primitives that are commonly used in Java, even really common ones, like AtomicReference or CountDownLatch. Heck, it doesn't even have volatile variables, let alone ForkJoinPool or other niceties. What's actually in the standard library? Well, the multiprocessing library is now baked in for doing "process-based threading", which really means stuff based on fork() that is unportable, because the language implementors gave up on threads a long time ago.
It doesn't stop at concurrency primitives though. For example Python has the notion of destructors in the language, the reference implementation having a GC based on reference counting, so when implementing it on top of the JVM/CLR or whatever platform that doesn't do reference counting, that's at least one feature that can't work.
Add to that libraries like NumPy/Scipy that are basically unportable, or Django that says it runs on Jython but nobody mentions that Django needs the MySQL client written in C and won't work with the pure version, or the myriad other libraries in the ecosystem all written for CPython and expecting a GIL. Anybody that is fantasizing about Python having a usable implementation other than CPython is delusional.
So?
> no, I disagree with you - multithreading is not an implementation detail.
Threading is a language feature, not an implementation detail. Whether threads are implemented by way of native threads on the underlying platform (as in JRuby, current CPython or MRI), or green threads in the runtime (as in old MRI, etc.), and, in the latter case, whether the green threads are mapped to native threads on an N:1 (as in old MRI) or M:N (as in the main Erlang implementation) model are implementation details.
> For example Python has the notion of destructors in the language, the reference implementation having a GC based on reference counting, so when implementing it on top of the JVM/CLR or whatever platform that doesn't do reference counting, that's at least one feature that can't work.
Sure, it could, since you could obviously (at the cost of making interop harder) write a Python implementation with its own garbage collector that ran on the JVM or CLR. You might choose to sacrifice portability for better interop with the languages the platform was designed for, but that's a choice.
> Django that says it runs on Jython but nobody mentions that Django needs the MySQL client written in C and won't work with the pure version
Seems to me that's a problem either with Django or the pure python MySQL driver, but not with the Python language.
> Anybody that is fantasizing about Python having a usable implementation other than CPython is delusional.
Perhaps; I'm less familiar with Python's other implementations than with Ruby's (particular JRuby) which is definitely usable, and definitely uses native threads without a GIL.
Talking about MRI here. I know rubinius and JRuby exist and offer some of those features
HotSpot wasn't released until 1999. Prior to that Java did not have a JIT. Java used to be very slow compared to compiled code and HotSpot was a BIG DEAL when it was released in '99.
GC that scales to hundreds of gb? Do you mean Azul, the proprietary and expensive JVM implementation?
You're right that those features provided by hotspot. But it is the reference implementation for the JVM after all.
The point remains that the java ecosystem - which includes tooling like eclipse/netbeans/yourkit and JVM implementations - provides the things I've listed that I find lacking in ruby.
> Python's standard library additions and syntactical choices were strongly influenced by Java in some cases: the logging package,[27] introduced in version 2.3,[28] the threading package for multithreaded applications,[29] the SAX parser, introduced in 2.0, and the decorator syntax that uses @,[30] added in version 2.4[31]
A question for you is why do you care? If a Java programmer tries to rib you saying that Java is better because x feature was influenced or 'stolen' from Java, just laugh at them and tell them then C++ must be 'better' than Java huh?
Sure, runtimes always evolve and cross-pollinate.
I don't care, but as stated in another comment, you often get that question from people joining over from the Java camp.
[0] 1983 "A real-time garbage collector based on the lifetimes of objects"
Ada is still in use today. Besides the military, there are a lot of "mission critical" systems written in Ada.
1975 (39) Modula 1988 (26) TCL
1977 (37) Ada [1] 1990 (24) J
1977 (37) Icon 1993 (21) Lua
1985 (29) Miranda 1994 (20) Pike
1986 (28) Oberon 1995 (19) PHP
1987 (27) Clean 2002 (12) Io
1987 (27) Self
[1] according to cragI don't know birth dates for these:
Agda, ATS, Felix, Idris
(I'm ignoring languages that are used only in a particular context, like R, shells, proof assistants; I made an exception for TeX and PostScript as these seemed particularly important.)> For me the purpose of life is partly to have joy. Programmers often feel joy when they can concentrate on the creative side of programming, So Ruby is designed to make programmers happy.
Happy hacking!
I'm coding in Ruby full-time for some months now and it's the most friendly language I've encountered, everything feels natural.
"This release is dedicated to the memory of our best comrade, Jim Weirich. Thank you, Jim. Rest in peace."
> Ruby 2.1 has many improvements including speedup without severe incompatibilities. You can use this on Rails and some applications, and get more comfortable experience.
Since the changelog is very large I'm still interested in what speedups are part of this release. Anyone?
http://tmm1.net/ruby21-rgengc/
http://tmm1.net/ruby21-oobgc/
And 2.1.1 is point release, so only contains bug fixes. It doesn't contain new features.http://www.infoq.com/news/2013/12/ruby21
I don't think this current patch release itself contains much performance fixes.
only perf related feature is: RUBY_GC_OLDOBJECT_LIMIT_FACTOR ... you can set it to 1.5 to heavily reduce RSS usage of 2.1
Beware of complacency or you will find yourself unemployable when Ruby will be old news.
I didn't learn any new language since I started C# 4 years ago and I mightily regret it.
People have been proclaiming the death of Java for how long now? And it's still going strong. I'd argue that Ruby will last even longer than Java because it's a nicer language and has more room to grow. Ruby you can port to other runtimes, Java, why bother? It won't outlive the JVM.
The only thing I think that could replace Ruby is Lisp. Maybe in 10 more years Racket will where Ruby is today. I doubt it. By that time, Ruby will be where Java is.
Well, the JVM will probably outlive the human race, so that's actually a comforting thought for Java developers :)
And why will it comfort Java-ites?
I'm picturing something involving lairs carved out of dormant volcanoes and pools with sharks (possibly with lasers).
The more important question is: will it still be possible to earn a respectable crust doing web development in Ruby in twenty years time? Any person who claims to know the answer to that one is a liar.
There are so many factors influencing language and API popularity that it's silly to try to bet it all on one language/platform or vendor at any time in your life. Why not just enjoy the ones you use, and when they are no longer of use (for whatever political, technical or personal reasons), switch to something else?
I don't have much love for C# but if your fundamentals are sound you won't have too much difficulty picking up a new language. 6 months ago I wouldn't have known an NSMutableArray from a bar of soap, a couple of books and some elbow grease later and I'm beta testing my first iOS app for the app store (with a ruby backend : D). And I am far from one of those "polyglot" hyper programming geniuses.
Stop regretting, start working, and keep going. This time next year you'll have another arrow for your bow. It's not rocket science, believe me.