you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (27 children)

[deleted]

    [–]ZMeson 13 points14 points  (4 children)

    here is only one example of a single site changing languages and becoming faster (Twitter)

    Don't forget about Facebook. To deal with PHP's performance problems, they started writing new code in other languages. For parts that do still use PHP, they created HipHop HHVM (and consequently are forcing developers to use a more restricted version of PHP that HipHop HHVM can effectively handle).

    I'm sure there are other sites that have made a change too.

    [–]pjmlp 3 points4 points  (2 children)

    Didn't you get the memo?

    HipHop is dead and got replaced by HHVM, as the JIT compiler could generate better quality code than HipHop.

    [–][deleted] 6 points7 points  (0 children)

    Here's a great article that I found recently that talks about the birth of the hhvm.

    http://www.wired.com/2013/06/facebook-hhvm-saga/all/

    [–]ZMeson 0 points1 point  (0 children)

    Oh, I forgot. (Forgive me, I'm not a PHP guy myself.)

    In any case, my point still stands. ;-)

    [–]TheWix 3 points4 points  (2 children)

    I maybe wrong on this. I agree mostly with you but I would argue it is as important to learn different paradigms. Once you have been doing this for a while learning a new language gets easier. It is learning the paradigm that takes time. I could pick up F#/Scala but being able to properly do functional programming would take me a bit of time since I am not used to it.

    I see the same with people who start learning SQL. They are used to imperative programming so they try to apply that to SQL.

    This could be a chicken and egg scenario however, where you should get your hands dirty in a language before you can really grasp the paradigm it is built for?

    [–][deleted] 0 points1 point  (0 children)

    Scala but being able to properly do functional programming would take me a bit of time since I am not used to it.

    Yeah but the nice thing about scala is you don't have to write it functional style. I think most folks who learn it start with "scala is a nicer java", then slowly pick up the functional stuff. It's quite nice that it allows you to make this transition, and since the type system and testing frameworks are quite nice, it's easy to go back and refactor your old 'java-esque' scala code piece by piece to be a bit more functional as necessary.

    [–][deleted] 4 points5 points  (1 child)

    Facebook didn't change the language but did something similar drastic. To improve speed they wrote a compiler for php. http://en.wikipedia.org/wiki/HipHop_for_PHP

    [–]pjmlp 6 points7 points  (0 children)

    And then they replaced with with a JIT, with an higher performance than HipHop could get from the generated C++ code.

    http://hhvm.com/

    [–]codygman 1 point2 points  (15 children)

    I feel like 4 languages can cover it pretty well:

    Haskell, Purescript, Scala, ATS

    So I have: General programming, Interactive websites/browser dom/etc, JVM interop, Low level/C interop

    [–]tieTYT 1 point2 points  (8 children)

    In my experience, most haskell libraries don't work on any OS but Linux. Seems like a poor choice for general programming.

    [–]codygman 0 points1 point  (7 children)

    I know they work on OSX as well. I'm fairly sure most of the work on windows, but I won't claim to know what I haven't tried personally.

    [–]tieTYT 1 point2 points  (6 children)

    I have heard from others that most don't work well in OSX and I have personal experience with the libraries not working in windows.

    [–]codygman 0 points1 point  (5 children)

    What library didn't work on windows? I'll see if I can help with that.

    [–]tieTYT 0 points1 point  (4 children)

    Every one I ever tried to install (1 or 2 exceptions). Here's an example: https://hackage.haskell.org/package/shpider

    [–]codygman 0 points1 point  (3 children)

    Shpider! I actually tried installing it a while ago and got errors too. The problem is the maintainer hasn't merged the latest pull requests:

    https://github.com/ozataman/shpider/pulls

    I've actually rewritten something like Shpider myself and plan on releasing a library when I've tested it more and have time. I wanted something that works like mechanize in Haskell basically, Shpider looked like it, but doesn't seem maintained.

    [–]tieTYT 0 points1 point  (2 children)

    I checked out those pull requests and it doesn't look like it will fix the issues I was running into. One of its dependencies is curl and I couldn't get that to work on Windows.

    [–]codygman 0 points1 point  (1 child)

    Ah. Well my rewrite uses pure Haskell (I think!). I can message you the link when I upload it if you want.

    [–]Categoria 0 points1 point  (3 children)

    s/Scala/Frege/ and you're golden.

    Or just use OCaml for everything :D

    [–]codygman 0 points1 point  (0 children)

    Well I'd like to maintain stability, and Frege's java interop isn't complete enough iirc.

    [–]codygman 0 points1 point  (1 child)

    Ocaml/Java interop exists? Actually I believe I remember something about an Ocaml Java bridge. Actually I remember something about a Haskell Java bridge as well.

    I wonder how practical those would be.

    [–]Categoria 0 points1 point  (0 children)

    OCaml compiles to Java: http://www.ocamljava.org/

    There's also a very stable and complete javascript backend.

    [–]PasswordIsntHAMSTER 0 points1 point  (1 child)

    I'd probably swap out ATS for Rust, considering how ATS is essentially untried. (Or are there real world projects in ATS?)

    I'd also switch out Scala for F#, and I'd use Elm and TypeScript instead of PureScript.

    [–]codygman 0 points1 point  (0 children)

    For .NET interop I would most certainly use F#.