4 ms·
This power does not come without a price. Ruby is slow. ARRRRGH! Why do the expectations of guys from the 80s and early 90s still rule us? There are Lisp and
by stcredzero 18y ago
This power does not come without a price. Ruby is slow.
ARRRRGH! Why do the expectations of guys from the 80s and early 90s still rule us? There are Lisp and Smalltalk VMs out there that are something like 70X as fast as Ruby 1.8! If you add Traits (library for Mixins) to Smalltalk, it is equivalent to Ruby in power. (1)
The one of the biggest misconceptions we have to face in the Computer programming and related professions, is that programmers are on the forefront of technology. Actually, culture lags technology. And in that, I specifically include the culture of computer programmers.
The foundations of OO languages like Ruby and Python were set forth in the 70s and 80s. WYSYWIG word processing, ethernet LANs, desktop publishing existed then in pretty much their current forms at Xerox PARC, only slower. The concepts embodied in Dot-NET and Microsoft's Singularity were bandied about in the 60s, 70s, and 80s.
The sad thing about our profession is, is that to learn what's coming next, and what's possible you still have to do some digging into history. Things have improved, but because programming is also a cultural artifact, it lags technology like any other cultural artifact.
I keep posting this. I used to wonder why it seemed like tilting at windmills. After writing this post, I now realize why.
Alan Kay: "The Computer Revolution Hasn't Happened Yet."
http://video.google.com/videoplay?docid=-2950949730059754521 http://video.google.com/videoplay?docid=-2950949730059754521
(1) - In fact, it is homomorphically equivalent. This is precisely why something like Maglev can work. Another interesting thing -- many Lisps are also homomorphically equivalent to at least 90% of the languages out there. And one could probably take just about any Lisp and give it the power of the other 10% (like Erlang) with moderate effort.
- jhancock 18y agothanks for saving me the time. my thoughts exactly! History should be the first thing we teach new programmers.
- sho 18y agoThere are NOT SmallTalk libraries out there that are 70x faster than Ruby - that would be faster than raw C (Ruby is about 30x slower). Are you trying to say that SmallTalk is faster on average than raw C? So why isn't everything written in SmallTalk? And I'll believe Maglev's outlandish performance claims if and when I ever see them realised. If they are anything like those claimed at RailsConf 2008 (50x or thereabouts), I'll eat my hat and any other hats anyone cares to send me. I say this as someone who would probably seriously consider murder if it would make my Rails apps run 10x faster. I want it to be true. I just don't think it is, unfortunately. And one could probably take just about any Lisp and give it the power of the other 10% (like Erlang) with moderate effort. I keep hearing things like this, but no-one ever does it.
- swannodette 18y agoever heard of Lisp Flavored Erlang? Ever heard of the Common Lisp Object System (inspired originally by Smalltalk)? Ever heard of Clojure (Haskell inspired STM, and lazy data structures)? ever heard of GOAL (Lisp assembly)? etc., etc. etc., etc., etc.
- sho 18y agoLike above I didn't make myself clear at all. Let me try again, by your leave. I wasn't claiming you can't tack feature X onto lisp, of course you can, you can implement anything in anything. The point I wanted to make was that "power" is not just some object feature bullet points, it's about ease of use and syntax and libraries as well. "If you add Traits (library for Mixins) to Smalltalk, it is equivalent to Ruby in power. (1)" Only for your definition of "power". Yes, everyone loves Ruby's super-flexible objects and mixins etc but that is only the start of the story. Its syntax is terse, intuitive and good-looking. The rubygems packaging system is effective and ubiquitous. Irb is excellent and "live coding" techniques are invaluable. To me, these are very much part of the real "power" and the main reason I prefer it over, say, Python. You might be able to emulate the object behaviour but it's still "incomprehensible mess of brackets" Lisp. You might be able to claim that Lisp is 90% "homomorphically equivalent", a phrase I don't think I've heard since Mathematics 2, but who gives a shit? Go ahead and add the last 10% of whatever it is that Ruby has and Lisp doesn't. Now you have just as much power as Ruby? So go ahead and type "require activerecord" (don't forget to compile!) and just try to tap into that power. Oops. "Language power" is not just some reductive theoretical idea of what features a language has, or could implement. It's the whole package, and how you use it. Sure you can add Ruby's features to C. But a better way is to implement Ruby in it. Lisp might well be the infinitely flexible meta-language which can be used to describe all others, but that isn't actually useful in itself, as used today. Lisp may be an incredibly powerful tool for something, but it has little advantage for conventional end-user code, not any more anyway. It's pretty exciting to think where it might end up, though. "And one could probably take just about any Lisp and give it the power of the other 10% (like Erlang) with moderate effort." Again, only for your definition of "power", which is not what the average programmer who is just interested in getting stuff done is thinking about.