Hacker News new | ask | show | jobs
by dom96 4361 days ago
This blog post misses a very good Python replacement, namely Nimrod (http://nimrod-lang.org).
2 comments

With the exception of speed, why does Python need a replacement?

I am using Python daily, and pretty much all performance problems (with my work) can be solved at the database or caching level. I get the impression that Numpy can produce reasonable performance for numeric problems.

In my experience developer productivity is of far more importance to business than language performance (obviously that depends on your domain). I do get asked to speed things up. But I get asked for "something working" by yesterday far more often.

The blog post gives the rationale; it's a combination of performance, a hope that static typing would make it possible to avoid a class of errors 0install had been experiencing, and wanting to ship native binaries with no dependencies - a pretty specialized use case, but one that 0install happens to need. (I'm aware that things like freeze exist, but they're not really first-class citizens, and the startup time - very important for a command-line utility - is not great).

In general I agree with you, I was a big fan of Python until I discovered Scala. But it's not a great fit for the 0install use case, and as you'll see from subsequent posts, switching to OCaml turned out to increase reliability and performance without sacrificing concision or development productivity.

> With the exception of speed, why does Python need a replacement?

Depends what you use it for. It's very good for a subcategory of problems, in particular prototypes or glue code. However, it leads to "use your test suite as a compiler" for large scale projects due its lack of static typing.

> In my experience developer productivity is of far more importance to business than language performance

You seem to be assuming that Nimrod would necessarily be less productive to work with than Python?

I do like Nimrod. It has been around for a while. Has good syntax, good semantics (things it operates with). Very fast.

Sadly it doesn't have the advocacy and hoard of developers supporting it and writing libraries for it. Certainly no big company with billions of dollars of revenue. It is unfortunate.

I feel like Google should have just taken it and used it as Go back then. I would have been a good choice.

There is also GNOME's Vala language. More focused on GLib but the idea is the same. C# like language compiles to C. Good performance. But again kind of fringe.

This "fringe-ness" in longer term translates in less libraries/frameworks. With Python if I am starting on something new, I know I can probably find someone that wrote a library related to it. Scientific computing, AI learning, graphics, GUI bindings, http parsing, WSGI middleware, strange protocol parsers, libraries on top of C libs (parse .pcap files) and so on. All are just one search and download away.

With Nimrod (or any new language) I am afraid I would be writing those by hand.

> There is also GNOME's Vala language. More focused on GLib but the idea is the same. C# like language compiles to C. Good performance. But again kind of fringe.

It seems like native imperative languages with automatic memory management has just fallen by the wayside as history has progressed, or have been relegated to niches. I wonder why that is.

Java happened. Sun took the JIT from SELF and everyone went JIT, repeating the VM everywhere from the P-Code days. Forgetting the native wave that followed.

However Java and C# do have quite a few native compilers available. They just tend to be forgotten on discussions about them.

> However Java and C# do have quite a few native compilers available. They just tend to be forgotten on discussions about them.

Are there any viable ones for java? It would be pretty cool if one could leverage some of the java ecosystem without having to include a vm. EDIT: I'm guessing that making command line utilities would be more viable, for example.

Most of them are commercial.

Excelsior JET - http://www.excelsiorjet.com/

Codename One - http://www.codenameone.com/

Atego Perc - http://www.atego.com/products/atego-perc/

JamaicaVM - https://www.aicas.com/cms/en/JamaicaVM

IBM J9 - http://www-01.ibm.com/software/wireless/wece/

Atego, Jamaica and J9 are not full native compilers, rather JVMs with support for AOT deployment, similar to .NET NGEN/JIT story.

Additionally Oracle has kept the Sun's work from the meta-circular JVM, Maxime as Graal and Truffle. Which may replace Hotspot for Java 9 or later and being used by AMD/Oracle for the GPGPU support.

This Java meta-circular compiler has support for JIT and AOT compilation.

https://wiki.openjdk.java.net/display/Graal/Main

EDIT: I forgot to mention the efforts of the guys behind RoboVM, currently the best way to target iOS with Java, http://www.robovm.org/