5 ms·
Increased performance ten-fold by switching to a superior language
- Luyt 15y agoHe's dismissed as a troll, but I find his commit quite interesting. It allows you to compare a real world working program written in Javascript (a language I know) to the same thing written in Erlang (a language I don't know, but find interesting). A bit like those textbooks with on one side of the page the original Latin text, and the English translation on the other side.
- akent 15y agoExcept that the new code does not really do the same thing at all. The JS code seems to be a SMTP mailer / client whereas the erlang code is clearly an SMTP server.
- BasDirks 15y agohttp://rosettacode.org/wiki/Send_email http://rosettacode.org/wiki/Send_email But then again, trolling is more fun than contributing to something.. Right?
- guywithabike 15y agoIt's unclear to me if the lisp version is actually any faster. Does anyone know if this is just a pure troll or if there's any substance to it?
- stock_toaster 15y agolisp? Looked like erlang to me.
- BasDirks 15y agoErlang, not lisp.
- Luyt 15y agoInterestingly enough, this long-time Erlang developer is contemplating switching to Clojure for a variety of reasons. ('Erlang is a ghetto') http://www.unlimitednovelty.com/2011/07/trouble-with-erlang-or-erlang-is-ghetto.html http://www.unlimitednovelty.com/2011/07/trouble-with-erlang-...
- signa11 15y ago"Funargs: Ruby-like blocks for Erlang" is the discussion thread that resulted in that blog post: http://erlang.org/pipermail/erlang-questions/2011-July/060104.html http://erlang.org/pipermail/erlang-questions/2011-July/06010...
- akent 15y agoThe "new" code appears to be https://github.com/tonyg/erlang-smtp/blob/master/src/smtp_server_session.erl https://github.com/tonyg/erlang-smtp/blob/master/src/smtp_se... with the copyright notice changed.
- deleted 15y ago[deleted]
- newtonapple 15y agoApparently he also rewrote Erlang from scratch to be "more efficient and performant" (private repo): https://github.com/eddiedeck/airlang https://github.com/eddiedeck/airlang
- signa11 15y agoperlisgram (isn't that a word ?) : "When someone says "I want a programming language in which I need only say what I wish done," give him a lollipop."
- schiptsov 15y agoErlang isn't superior just because its VM is faster and well-designed for high throughput. It is superior because it is functional, which means, while it's possible, less state, less undefined behavior, less crashes, less bugs. Because it has efficient process-based execution model - easy scalable with less complication, less synchronization, less overhead. It is superior because it is less verbose and more readable which is really matters for a language, not its runtime. There are only two big problems with Erlang - there is no huge mediocre crowds with knowledge of language basics and some cowboy-coding experience gained from monkey-spaghetti-patching of some bunch of web-pages, and it has no hyped projects like adding libevent functionality to really good (no kidding!) in-browser VM. (hint: General purpose VM should be, at very least, SMP-aware). btw, Trolls of all countries, unite! ^_^
- donw 15y agoWhenever I see someone that scoffs at Blub[1] because Blarb is 'so much better', I instantly think less of them as a developer. In my experience, people like this spend all their time screwing around with esoteric languages and abstract debates about semicolons, and don't spend any time building anything of value anyway. This isn't to say that you shouldn't learn Erlang, or Scala, or Haskell, or any number of oddball languages. Doing so makes you a better and more-rounded programmer. But the haughty attitude of 'Blub is better than Blarb' reeks of naïve fanboyism. Every language brings something to the table, despite their drawbacks. Ruby is beautiful and a joy to work with. Python is powerful and has amazing libraries. PHP is easy to pick up and has a huge community. Ignoring languages because they aren't 'purely functional', 'high performance', or 'mathematically correct' is hugely ignorant. [1] http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- deleted 15y ago[deleted]
- syaz1 15y agoWell done sir, nicely put. "Use the right tool for the right job" is also highly contextual. For the same job the right tool for you may be Python, for me PHP.
- petervandijck 15y agoI'm starting to think "the right tool for the right job" is one of those 50s advertising things that was pushed by the tools industry. Like smoking making women look independent.